- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 04:56 AM
Hi Community,
I need help in developing client script.
Please consider below scenario:
When I select "Singapore" as a choice from the field "Please select the region you are in:"
Then the records in field "Please select the Service you are having issue with:" must only start from SGP.
The field "Please select the Service you are having issue with:" is a Reference field to cmdb_ci table.
Please help me construct a On Change Client Script that modifies the data i.e starts with SGP .
Thanks in Advance,
Hritik.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2023 12:25 AM - edited 11-17-2023 12:29 AM
Hi @Hritik
Okay there you go! 😋
javascript:"operational_status=1^sys_class_name=cmdb_ci_appl^ORsys_class_name=cmdb_ci_service^ORsys_class_name=cmdb_ci_service_technical^ORsys_class_name=cmdb_ci_service_business^nameSTARTSWITH" + current.variables.please_select_the_region_you_are_in.toString();
Cheers,
Tai Vu

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 05:01 AM
Hi @Hritik
You can't do this with a Client script. You will need to use a reference qualifier on the second field.
You might be able to use something like this:
javascript: if(current.variables.region == 'Singapore'){'idSTARTSWITHSGP'};
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 05:04 AM
Hi Peter,
They are two different fields.
Where do I add the Reference Qualifier ?
Basically, the values in Field "Please select the Service you are having issue with:" must be dependent on the selection of field "Please select the region you are in:"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 05:10 AM
You would need to add it in the Service field record for example like this in the Reference Qualifier field:
The example I provided is of course for just one selection. If you will need a lot, it would be better to use a script include instead. But first let's see if this works for you.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 05:25 AM
Hi Peter,
I added below ref qualifier, but it's showing all the records. Not working.
Also, there are 17 choices , so we would need to create script include.
Could you please suggest how can we create script include ?