Skip to main content
1-Visitor
Solved

Disable button if user can't use it

Hello! 
So I have a button that I would like to disable when a specific user doesn't have runtime permission to the service linked to that button. How can I do it? 

zyuan1Answer
5-Regular Member

The Button only receives true and false to enable and disable it's function, so you need to define the logic which user can use them.

 

If you can use Validator language to realize the logic, you can use the validator command, if not, you can create a js service and add it to your data source.

 

It may look like :  return Resources["CurrentSessionInfo"].GetCurrentUser() in ['Abby','Bob','Chandler','Ella'];  and it gives out a true or false result.

10 replies

16-Pearl

Buttons have a Visible property which is bindable. 

Translate
1-Visitor

yes but I would like to have it visible but not clickable, is it not possible?  

Translate
16-Pearl

There is a Disabled property as well which is bindable. 

Translate
Support

Hi @JulianaGuerra.

 

If you feel your question has been answered, please mark the appropriate reply as the Accepted Solution, for the benefit of others with the same question.

 

Regards.

 

--Sharon

Translate