Need help with Catalog client script to show the appropriate options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2024 03:47 AM - edited ‎09-02-2024 05:15 AM
Hi
I need help writing a catalog client script for my item.
The idea is that depending on the selected Resource Group, the appropriate Resource Sub Category will appear.
I created two Select box lists 1. resource_group 2. resource_sub_group but I can't write it correctly in the script because each version displays all options..
- Interims
- Interims - via Assured Partner
- Interims - Independents
- Persistent Externals
- Persistent Externals - via Assured Partner
- Persistent Externals - Independents
- Occasional Externals
- Occasional Externals - via Assured Partner
- Occasional Externals - Independents
- Non-Executives (no additional resource sub group dropdown required for this)
This is my script but no working..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2024 03:50 AM
@New user1212 Instead of handling this through a client script, you should instead make Resource sub category field dependent on the Resource Group field. Please refer to this documentation https://docs.servicenow.com/bundle/xanadu-platform-administration/page/administer/field-administrati... to know more about the steps to make a field dependent on another field.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2024 04:18 AM
you can't create a dependency for a catalog item, it has to be a client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2024 05:28 AM
HI, @New user1212
You can try the script below; it works properly on my instance.