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.

Selected Catalog item variables are not properly visible in RITM's Variable Editor?

The Matrix
Tera Contributor

Hi All, 

I'm facing one issue that the variables from catalog item are not properly visible in RITM's Variable Editor.  Do I need to make any additional configuration for this?

In our catalog item we have multiple fields, based on category and subcategory field value, we are controlling the remaining fields visibility, hiding and making some fields mandatory. for that we have used catalog client script to control the visibility and making fields mandatory. But the issue we are facing here is that the selected catalog item variables are not visible in RITM's item variable form section. 

Thanks

TheMatrix_0-1761969610533.png

 

5 REPLIES 5

SAI VENKATESH
Kilo Patron
Kilo Patron

Hi @The Matrix 

There is a possibility that you have not checked the applies on requested items checkbox.

 

SAIVENKATESH_0-1761972138199.png

 

 

Thanks and Regards

Sai Venkatesh

Nishant8
Giga Sage
Giga Sage

Hello @The Matrix, If your Client Script is hiding the variables properly in the catalog item view and you don't want to run it on the Request Item then you can uncheck the 'Applies on Requested Item' option. When this option is selected then Client Script runs here too and hides/visible the fields.

 

Nishant8_0-1761974313849.png

 

Regards,

Nishant

Brad Bowman
Kilo Patron
Kilo Patron

All variables are viewable on the RITM record unless you have something in your instance to make them hidden.  This could be the 'Hidden' checkbox on the variable definition

 

BradBowman_0-1761995127556.png

Or a Catalog UI Policy or Catalog Client Script that is inadvertently running onLoad of the Requested Item and affecting the variable(s) in question. If you want the variables hidden unless other variable(s) have certain values, you may need to add an onLoad script similar to existing onChange scripts, or just remove the default if block from the onChange script and it will also run onLoad

//if (isLoading || newValue == '') {
//        return;
// }

Ankur Bawiskar
Tera Patron
Tera Patron

@The Matrix 

any catalog UI policy or catalog client script is running on RITM and hiding that?

what debugging did you do?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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