Help with catalog item form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 02:33 AM - edited 03-06-2024 02:50 AM
Hi all,
I have created a catalog item and I have two reference fields on the form: "office_location" which references the "cmn_location" table and "choose_the_software" which references the "u_software" table.
If I select "New York" as office location, I want to then be able to hide the software "Cube3D" optionfrom the choose_the_software reference field.
Can anyone help with catalog client script please?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 02:38 AM
Hi @cicgordy
You need to write a client script for the same mate.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 02:49 AM
Hi @Dr Atul G- LNG , yes I needed help writing a client script please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 02:52 AM
Hi @cicgordy
I am not coder 🙄 but these can help you
Check Ankur reply.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) {
return;
}
g_form.clearOptions('request_type');
if(newValue == 'Card Swipe Unit'){
g_form.addOption('request_type', choicevalue, choiceLabel);
g_form.addOption('request_type', choicevalue, choiceLabel);
}
}
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 02:52 AM
@cicgordy You will not be able to handle this via a client script as both office_location and choose_the_software are reference fields here.
In order to address this requirement, you will have to create an advanced reference qualifier on the choose_the_software variable. This reference qualifier will use a script include to return the software for a specific location.
Do you have a location column on the table being referenced in choose_the_software field?