- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 12:27 PM
How to set the user criteria to us users only? I have a catalog item I want to be visible only to users in the US and there's no group containing all US users.
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 01:06 PM
Hi Astanley,
Kindly update the script as below
var userGR = new GlideRecord('sys_user');
userGR.addQuery('sys_id','user_id');//country=US^active=true
userGR.query();
if (userGR.next()) {
if(userGR.location.country == 'US')
{
answer = true;
}
else{
answer = false;
}
}
Regards,
Deepankar Mathur

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 01:16 PM
Hi Astanley,
Let me know in case of any queries.
If you think my response is helpful for you? If yes, mark it as correct answer and close the loop so that it would help future readers as well.
Regards,
Deepankar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 12:31 PM