- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2018 06:52 AM
Hello,
We have a requirement to lock down records (REQ and RITM) to one catalog item Spot Bonus. Those can view would be those with a manager role as long the manger is not the one who getting the spot bonus. There is a variable called user receiving bonus. I am having issues restricting the manager from seeing it if they are the user in the variable. Any assistance is appreciated.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2018 02:17 PM
Use below script
if(current.request_item.variables.variablename!= gs.getUserID() )
answer=true;
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2018 02:17 PM
Use below script
if(current.request_item.variables.variablename!= gs.getUserID() )
answer=true;
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2018 07:14 AM
Thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2018 02:06 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2018 02:17 PM
Use below script
if(current.request_item.variables.variablename!= gs.getUserID() )
answer=true;
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2018 10:24 AM
Hi,
You will have to use client script to lock down catalog item variables.
Please follow below post for further direction
https://www.servicenowguru.com/scripting/business-rules-scripting/variables-form-readonly/
Regards,
Sachin