Good morning. Trying to return a true/false value on the user role tag in Ignition to enable certain buttons being visible or not. I've just created a label with the following expression:
if ({[System]Client/User/RolesString} = 'Manager','True','False')
I know the "=" is the wrong thing to use here, but I'm not sure how to find what I'm looking for in the substring as my users can have multiple roles depending on their department and level in the company. In SQL I would just use the like %manager% but I'm not sure how to translate this over to Ignition, or the best practice to do it. Any ideas?
If your trying to hide a button based on a role why not just use the security settings for the object? Then you can select the roles and use the hide restriction instead of recreating it with an expression?