Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Ankur Bawiskar
Tera Patron
Tera Patron

Sometimes there is a need to access variables defined on catalog item within MRVS client script to show/hide variables within MRVS.

You can access the variables with this syntax. This works in both Native + Portal

var applicationType = g_service_catalog.parent.getValue("variableName");

Example: I have used an onLoad catalog client script which applies to MRVS and it gave me the value of outside variable when the MRVS form was loaded.

Client Script:

AnkurBawiskar_2-1734076296775.png

 

Output in Native:

AnkurBawiskar_4-1734076392421.png

 

Output in Portal:

AnkurBawiskar_3-1734076337861.png

 

 

 

Comments
Manoharmanu
Tera Explorer

Thanks, this helped me.

Version history
Last update:
‎12-12-2024 11:54 PM
Updated by:
Contributors