run the onchange catalog client script when Variable is already having that value autopopulated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2023 12:20 AM
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2023 12:22 AM
This Onchange ccatalog client script i have written for specific catalog item.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2023 12:26 AM
Hi,
You need an onSubmit() script to get it worked when the Request Type is pre-selected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2023 12:36 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2023 12:36 AM
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.