how to set the variable set value on the Order guide which will have the same value across all

prasanna_da
Tera Expert

Requirement :

The order guide has 3 catalog item in it.
There is a variable set ,which is included in order guide and all the 3 catalog item

User Info

{ Check box : user_not_avaialble,

Reference : requested_for,

string : first_name,

string : last_name user} 
REquirement
Condition :: if user_not_available is Yes >then requested for field should be empty and first_name , and last_name is filled by logged in user > These manually field values to be made available for all the catalog items in the order guide.

 

Currently : requested for populated by the logged in user , so even if the user_not_available is checked the requested for populates by logged in user 


@ankur_bawiskar

 

1 ACCEPTED SOLUTION

Dnyaneshwaree
Mega Sage

For looged in user logic, you can refer requested for logic or if it is present in default value of field then refer below articles:

https://www.servicenow.com/community/service-management-forum/how-to-get-logged-in-user-information-...
https://www.servicenow.com/community/itsm-forum/how-to-populate-the-logged-in-user-to-a-variable-fro...
https://www.servicenow.com/community/developer-articles/get-user-details-based-on-the-logged-in-user...

Please accept my solution if it works for you and thumps up to mark it as helpful.

Thank you!!

Please accept my solution if it works for you and thumps up to mark it as helpful.
Thank you!!

Dnyaneshwaree Satpute
Tera Guru

View solution in original post

2 REPLIES 2

Dnyaneshwaree
Mega Sage

Hello @prasanna_da ,

You need to add onchange catalog client script on that variable set/ order guide and onchange on user_not_available varaiable and getvalue of the same and if condition if it is yes then clear value of requested for and value of logged in user for first name and last name.

Please accept my solution if it works for you and thumps up to mark it as helpful.

Thank you!!

Please accept my solution if it works for you and thumps up to mark it as helpful.
Thank you!!

Dnyaneshwaree Satpute
Tera Guru

Dnyaneshwaree
Mega Sage

For looged in user logic, you can refer requested for logic or if it is present in default value of field then refer below articles:

https://www.servicenow.com/community/service-management-forum/how-to-get-logged-in-user-information-...
https://www.servicenow.com/community/itsm-forum/how-to-populate-the-logged-in-user-to-a-variable-fro...
https://www.servicenow.com/community/developer-articles/get-user-details-based-on-the-logged-in-user...

Please accept my solution if it works for you and thumps up to mark it as helpful.

Thank you!!

Please accept my solution if it works for you and thumps up to mark it as helpful.
Thank you!!

Dnyaneshwaree Satpute
Tera Guru