How to see if a button is clickable?

Problem: I have a table (500+ rows) where people are updating their project statuses. If there’s a status change, I will record it and every hour, send a notification out to the TPMs on the status change.

Right now, the notify buttons are disabled if there is no status change to the project but if there IS a status change, the notify button is clickable. I would assume that if I do a runactions() on the notify column, it will click all the buttons no matter if it is disabled or clickable. I would like to do a filter(button = active) in the automation rule to prevent this from happening. Is this a performance enhancing approach and if so, how can I see the state of a button?

Hello @mattics

If a button is disabled (using the “Disable if” parameter), its action will not run when the “click” comes from another source other than the user pressing the button. This is the opposite of your assumption.

I use this feature often for a similar purpose to what you described.

Best Regards
Arnhold

1 Like

Hi,

I suggest you try and filter in your runActions() using the same filter as the disable filter in the button setup:

2 Likes

@mattics

Not related to the technical topic, but I agree with @Piet_Strydom—it’s always a good practice to test things. Testing allows you to see how something works and uncover any limitations, especially when the documentation doesn’t fully describe the behavior.

I don’t mean to be rude or anything like that, but I could assume that the time spent creating and posting here could have been used to perform the test and see the results yourself. Of course, it may not be the case—you might have tested it and observed different behavior, which would make this forum the perfect place to discuss it. If that’s the case, please let us know.

Apologies if I came across as rude or made incorrect assumptions.

Best regards,
Arnhold

That said, I’ve built a simple way to test the behavior you’re aiming for.

  • The first button adds a row to the table with “FIRST BUTTON” as the name, while the second button adds “SECOND BUTTON.”
  • A toggle is placed near each button and is connected to the “Disable if” property of the corresponding button.
  • A third button, using the RunActions formula, triggers both buttons.

You’ll notice that only the buttons that are enabled will perform their actions. If both are disabled, no action will be taken.

1 Like

@Felipe_Arnhold @Piet_Strydom no worries, I was just thinking I could find the state of a button through the button itself but what piet says does make sense LOL. Why didn’t I think of that before. -_- thanks all and happy holidays! my brain is in a holiday mood already :stuck_out_tongue:

2 Likes

I was interested on the performance aspect. Will runactions() still click on disabled buttons?

1 Like

I understand. :sweat_smile:
I’m in a similar mood hahaha

Just returning to the discussion, using the example I shared earlier: When you click the button with the RunActions formula, the alert displays the number of actions taken, which will be zero if both buttons are disabled.

From a performance perspective, I can assume that since the action isn’t executed, the only operation performed is a check on the “Disable if” parameter.

Best regards, and I wish you happy holidays!
Arnhold

1 Like

I totally understand it now :). didn’t think of using the message as a way to check if a button was attempted to be clicked but it does make sense. thank you Felipe! happy holidays to you too!

1 Like