How to make service catalog item visible to only US users?

astanley
Tera Contributor

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.

1 ACCEPTED SOLUTION

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

View solution in original post

6 REPLIES 6

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

Akshay Bhaskar
Kilo Sage

Hi @astanley

Have you explored the related list capabilities for catalog items. Get into the catalog item record in configuration mode > right click on the header > Configure > Related Lists > Available at location

find_real_file.png