Disable Button if Another Button is Disable

Hi Everyone,

I am trying to figure out how to make a button in a table become disabled if another button in that same row is is disabled. Basically I have three buttons. Two of them do actions, and the third runs both of the first to buttons.

I want the third button (the one that runs both buttons) to be disabled if one of the first two action buttons are disabled.

I know I can use the “Disable If” part of the button, but I can’t figure out how to reference the disabled state of the button.

Any help would be appreciated!

Hi @Brad_Young :blush: !

Maybe you could try for the Disable if in your 3rd Button, something like :

DisableIf condition of the 1st button

OR

DisableIf condition of the 2nd button 

I don’t know if it’ll work though :innocent: … It’s just an idea :blush:

1 Like

That was my thought as well, but Im not sure how to reference the second button’s status of being enabled or disabled. Any idea how to do that?

I thought it may be false, but when I did thisrow.2NDBUTTON=false in the disable area it didn’t work.

I don’t think there’s a way to check directly if a button is disabled or not :thinking:

But, here’s a sample to illustrate what I had in mind earlier :blush:
As I don’t know much about your actual setup, it might just not work… it’s still “just an idea” :innocent:

In the sample, you’ll see 3 buttons (+1 to Reset the Row):

  • Button 1 simply adds 1 to the field [A number]
  • Button 2 simply adds 2 to the field [Another number]
  • Button 3 is a push buttons button which when clicked will push Button 1 and Button 2

Both Button 1 and Button 2 have a Disable If condition:

  • For Button 1, it will be disabled if thisRow.[A number] = 4
  • For Button 2, it will be disabled if thisRow.[Another number] = 6

Now, to disable my Button 3 if Button 1 or Button 2 is disabled, I just re-used in the Disable If of the Button 3 the same conditions which would disable my Button 1 and my Button 2 :blush:

So the Disable If of my Button 3 is actually :

thisRow.[A number] = 4 OR thisRow.[Another Number] = 6

So I don’t check if my Button 1 or Button 2 is currently disabled or not but I use what I already know about those 2 buttons (i.e.: when one or the other will be disabled) to disable my Button 3 :blush:

Again, I’m not sure if something like this could work in your doc, but I hope this helps a little :innocent: