run the onchange catalog client script when Variable is already having that value autopopulated

ServicenowDev19
Tera Contributor

I have a order guide with multiple catalog items. I have written a onchange catalog client script for Scenario that when Request type is Add then show a popup.This is working when i select request type as Add.

But When catalog item in order guide is autopopulated with request type as Add then this script is not working.

How to make  this script executable when variable is already autopopulated as request type Add on catalog item.

 

Script:

ServicenowDev19_0-1701073095130.png

 

5 REPLIES 5

ServicenowDev19
Tera Contributor

This Onchange ccatalog client script i have written for specific catalog item.

 

Jaspal Singh
Mega Patron
Mega Patron

Hi,

You need an onSubmit() script to get it worked when the Request Type is pre-selected.

How? Can You Share me the Code How to work in both ways if request type is Autopopulated as Add and When we selectd as Add?

 

Mohan raj
Mega Sage

Hi @ServicenowDev19,

 

 

Cascade variable : false

 Not allow you to use the same value in different catalog items (Populate the same value variable). 


Cascade variable : true

 allow you to use the same value in different catalog items (Populate the same value variable)

 

 

Try to uncheck the cascade variable, so the auto populate of variable in catalog item won't work then you catalog onchange client script will work.

 

 If my response helps you to resolve the issue close the question by Accepting solution and hit thumb icon. From Correct answers others will get benefited in future.