How to pass variables from one catalog item to another

Garima Tripath1
Tera Contributor

I have a requirement wherein I have created a main page catalog item which has a field request type, and we have created a next button on this page, based on the selection of the Request Type when a user clicks next, they are being redirected to the respective catalog item anf from there they can click on Submit and create request.

I want to know how I can pass variables from one catalog item to another.

This requirement is similar to order guide and cascading variables.

I want to know how we can cascade variables without using order guide

 

2 REPLIES 2

Omkar Mone
Mega Sage

Hello Garima,

 

If you are doing this from HTML, then you should look at using the ng-model to store the data which you can add to a field so that it stays there.

https://www.geeksforgeeks.org/angularjs-ng-model-directive/#:~:text=ngModel%20is%20a%20directive%20which,text

ngModel can be used on inputs, textareas, and select elements. It binds them to a property on the scope.
Official docs for ngModel: https://docs.angularjs.org/api/ng/directive/ngModel

 

Hope this helps you.

 

Regards,

Omkar.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can include the variable values in the URL as parameters.

Then on the redirected catalog item; you can use onLoad catalog client script and get the url parameter value and use those to set the respective variables

3 Ways to Populate Values in ServiceNow via the URL

Regards
ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader