- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 02:06 AM
I have created four catalogs and each catalog i have to write an onLoad script however the code for the onload is same for all 4 catalogs , is it possible to reuse the same script in all 4 catalogs ?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 02:31 AM
Hello @kiwi07
You can create a variable set, and define the client scripts within the variable set.
Then you can use the same variable set on multiple catalog items, without having to write it for all catalog items individually.
You can also define UI policies, and variables within a variable set which are designed to be reused in other variable sets.
You can read more about variable sets here : https://docs.servicenow.com/bundle/tokyo-servicenow-platform/page/product/service-catalog-management...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 02:35 AM
Do you mean catalog items?
You can do this by creating a new variable set, and once saved, you will be able to define your onLoad Catalog Client Script within that Variable Set. Then you can simply map all your catalog items to this variable set via the "Included In" related list.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 02:31 AM
Hello @kiwi07
You can create a variable set, and define the client scripts within the variable set.
Then you can use the same variable set on multiple catalog items, without having to write it for all catalog items individually.
You can also define UI policies, and variables within a variable set which are designed to be reused in other variable sets.
You can read more about variable sets here : https://docs.servicenow.com/bundle/tokyo-servicenow-platform/page/product/service-catalog-management...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 02:35 AM
Do you mean catalog items?
You can do this by creating a new variable set, and once saved, you will be able to define your onLoad Catalog Client Script within that Variable Set. Then you can simply map all your catalog items to this variable set via the "Included In" related list.