- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Is it possible to show/hide a catalog variable based on if a user is member of group?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
I ended up creating a role. Applied the role to the group and set the 'Read role' in the variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
@athavichith Use the script checkbox in the UI Policy and make a GlideAjax call from the UI Policy script to check if the user is member of the group or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
@athavichith You need to user Client Script(onChange/onLoad depending on the requirement).
Then using Catalog Client scripts and GlideAjax combination you can achieve this requrement.
The code that you will write in GlideAjax function will be :
gs.getUser().isMemberOf('GROUP') method works at server side. You need to execute this via GlideAjax.
If this returns true then show the catalog variable and vice versa.
Kindly mark my response as helpful if it resolved your doubt.
Thank you,
Mahesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
I ended up creating a role. Applied the role to the group and set the 'Read role' in the variable.
