How to populate drop down values dependent on reference field value in service catalogs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2022 09:50 PM
I have below requirement for my service catalog variable.
Variable1 - reference from xyz table
Variable2 -dropdown
if Variable1 is abc {
show the below values from Variable2 dropdown
Choice value1
choice value2
}
Else{
show the below values from Variable2 dropdown
Choice value1
Choice value3
}
I want to show the values based on reference value selected and drop down changes accordingly.
I am new to build service catalog. Anyone have any idea regarding this please help me.
thanks in advance
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2022 11:38 PM
Hi @sony8 ,
I think you need to write "onChange" client Script for that dropdown particular catalog item variable ex.= "Variable2 -dropdown".
You can add your reference field name & dropdown list name and try it.
If I have answered your question, please mark my response as correct and/or helpful.
Thanks,
Omkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2022 11:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2022 11:55 PM - edited 10-21-2022 05:56 AM
@sony8 Yes we cannot use GlideRecord on client script because its not best practice.
But I try using Catalog client script And its working so you just try it your end if its not working then let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2025 08:59 AM
Hi Omkar,
I tried this on my end for the same scenario and whenever I test this on service portal, it says error in JS code. Any insights on this? Thanks!