Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 08:22 AM - edited 08-07-2024 08:26 AM
Hi All
Looking to create a new user criteria so I can restrict visibility of a catalogue item I am building to just group managers.
Any guidance appreciated as ever.
Brad
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 08:39 AM
You could try something like this:
answer = checkCondition();
function checkCondition(){
var gr = new GlideRecord("sys_user_group");
gr.addQuery("manager", user_id); //Looks to see if this user is listed as a manager on any user record
gr.setLimit(1);
gr.query();
if(gr.hasNext()) //If the user is listed as a manager in a group
return true;
else
return false;
}
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 09:30 AM
Hi
thank you for your response.