Service Catalog Variables

Mark Wood
Tera Contributor

Hello Experts,

I have created four below variables for catalog items.
1]Requested for reference field referring sys_user
2]Request type select box variable with two choices replace existing equipment and new equipment request
3] The second variable I have created is the Reason for replacement.
reason for replacement will be visible only when the user selects replace existing equipment
. " The reason for the replacement variable appears which is the select box variable with two choices lost/stolen, broken.
4] The watch list variable is the list collector type referring to the sys_user table.

Now my requirement is when If 'Request Type' is 'Replace Existing Equipment' and
If the 'Reason for Replacement' is Broken/Lost Stolen Then want to populate the watch list field with the Requester's Manager. How can I achieve this I am trying to use on change client script not getting results as expected.

thank you.

1 REPLY 1

Brad Bowman
Kilo Patron
Kilo Patron

Post your script attempt, and we'll get you sorted.  Make sure you are testing for the value of the Type and Reason variables - a select box variable choice has a Text/Label and a Value - scripts need to use the value in an if condition.  One approach to the rest is a getReference on the Requested for variable to return the value of the user's manager.

https://docs.servicenow.com/bundle/tokyo-api-reference/page/app-store/dev_portal/API_reference/Glide...