Need to populate the stockroom based on the selected Location on the form level
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 02:45 AM - edited 11-22-2023 03:32 AM
Hi All,
I am working on one of the form in this form I have "Location" it is referring to cmn_location and "Stockroom" it is referring to alm_stockroom. I need to populate the stockroom based on the selected location on the form level.
1. on change of the location field it should be updated to only show active stockrooms associated with the selected location. On change of location the stockroom must be updated.
2. the stockroom field should be read only when the location field is empty, which will force the user to select the location field first. when not empty, the stockroom field will be editable and updated with active stockrooms only specific to the location selected.
OnChange of location,
I tried with the above script I am getting all the Stockrooms.
Please any one provide me the input,
Thanks,
Vinutha

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 02:51 AM
Hi,
You can use onChange Client script to populate Stockroom based on selected location.
And use reference qualifier to limit the list to show stockrooms related with location.
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 02:53 AM
You can use GlideAjax to get stockroom based on location and set the value in callback function.
Check below links to learn more about reference qualifier with example.
https://www.servicenow.com/community/itsm-articles/reference-qualifier/ta-p/2306509
Thanks
Anil Lande