Question:
How can I limit the visibility of a button inside an XControl to two user groups?
Solution:
To do so, follow these procedures:
- Create an internal tag that saves the information of whether the button is displayed.
- Create a script at Viewer‘s OnLogin event that will update the value of the created tag by using Application.IsUserMemberOfGroup(“group name”) function. If you wish to test more than one group, just use OR operator.
- Insert a Boolean property in the XControl.
- Link this property to the button’s Visible property.
- On the application’s Screen, insert an instance of the XControl and link its new property to the value of the internal tag.
NOTE: Attached to this article is a sample application created with Elipse E3 version 3.1 build 270.