- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2023 01:12 PM
Hello, I am trying to make an order guide available for users that currently have the organization "Texas" on their user profile, I am running a script which is below in the "Available for" tab on the order guide. it is making me create a user criteria so I chose the advance selections, currently my script isn't working and would like feedback OR any other way of doing this is appreciated, tyia
var userGR = new GlideRecord('sys_user');
userGR.get(gs.get(user_id));
if (userGR.getValue('u_organization') == '(Texas'){
answer = true;
}
else{
answer = false
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2023 04:20 PM
Hello @HenryD,
Try using this script
var userGR = new GlideRecord('sys_user');
userGR.get(user_id);
answer = (userGR.getValue('u_organization') == 'Texas');
Hope this helps.
Kind Regards,
Swarnadeep Nandy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2023 04:20 PM
Hello @HenryD,
Try using this script
var userGR = new GlideRecord('sys_user');
userGR.get(user_id);
answer = (userGR.getValue('u_organization') == 'Texas');
Hope this helps.
Kind Regards,
Swarnadeep Nandy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2023 08:19 AM - edited ‎08-31-2023 08:20 AM
@SwarnadeepNandy Hello thank you this is actually what im looking for, by chance do you know a script that would be the same however if the orgainzation is "Texas" & "Oklahoma"? can you display what that code would be? i know it has something to do with the "||" but i cant seem to figure it out

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2023 12:09 PM
Hello @HenryD,
var userGR = new GlideRecord('sys_user');
userGR.get(user_id);
answer = (userGR.getValue('u_organization') == 'Texas' || userGR.getValue('u_organization') == 'Oklahoma');
I think this will work.
Kind Regards,
Swarnadeep Nandy