How to make a Dictionary Entry Attribute conditional?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2018 11:07 AM
I have a UI macro next to my configuration item field that is added using the "Attributes" field in the corresponding "Dictionary Entry" details of the configuration item. I'm wondering how I can make this macro visible only to users who have a specific role.
Here is what the current attribute is set to:
"ref_contributions=pcid_show_incidents;x_bmgr_support_ent_bomgar_push_start_local"
I'm trying to make the "x_bmgr_support_ent_bomgar_push_start_local" macro only appear for users with role "bomgar_admin".
Any ideas or guidance would be appreciated. Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2018 11:12 AM
you need to write on load client script to make macro visible to particular role.
Please check below for more details on solution
You can use the show_related_records out of the box UI macro as an example of how to manage the visibility of a UI macro within the macro code itself.
https://yourinstanceurl/nav_to.do?uri=sys_ui_macro.do?sys_id=2d8f82a2eb2031001c13abf11206fe83
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2018 11:38 AM
This needs to be accomplished in the UI Macro itself, not a client script on the form since that may require DOM manipulation which is not recommended. At the top of your Macro you should have a <g2:evaluate> section that is evaluating when to show this Macro or not, you will need to modify that to include your role. I don't have that macro in my demo instance so I cannot provide specific help.