Page 1 of 1

Conditionally disable a button

Posted: Tue Aug 08, 2017 11:49 am
by oakej
I have an authority program that my profound program calls and it returns a value of Y or N that is stored in the profound program depending on the users authority. I want to be able to disable a button if a N is returned, is this possible? I don't want to display a message stating that they don't have that authority and would prefer that the button is disabled.

Re: Conditionally disable a button

Posted: Tue Aug 08, 2017 12:48 pm
by Emily
Hi John,

There is a 'disabled' property for buttons that you could use for this. This property is bindable, so you could bind this property to an indicator to use in your program. When 'N' is returned in your program, you could set the indicator bound to the 'disabled' property to 'on' to disable the button. You could also use the 'visibility' property in the same way if you didn't want the button to be visible at all for users who do not have the proper authority.

I hope that this helps!

Re: Conditionally disable a button

Posted: Tue Aug 08, 2017 2:06 pm
by oakej
That works fantastically thanks so much