dynamically populate a field based on previous selected values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2018 06:16 PM
Hi
I am a newbie service-now developer here creating my first service catalog item form. My form contains 3 select boxes and each select box field has values like "Low" "Medium" "High". Depending on what the users select as response in each of these select boxes, I need to do a calculation and display what category the request needs to be raised or if the request is not required.
How can I achieve this? I have created the form but am yet to write the functionality to achieve the above request. What is the best approach? My plan was to create a table of matrix based on the different values selected in those three select boxes and another column in the table that defines the outcome. I can refer to the combination and outcome and display the result in my form. Will this be a better approach? Again, I am not sure how to implement this. Any advice is greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2018 06:20 PM
Hi Coleton,
Thanks for your inputs. I was playing around Data Lookup rules until last night without reading your latest response. I have worked out that the value can be populated using Catalog Client Scripting instead of UI Policies. I have achieved by creating OnChange scripts for each select box fields and how the value gets updated in the Tier Classification read only field.
I have a new issue now - when I preview the catalog item form by click the Try It button, the scripting works properly. However, when I am trying to view the form from Service Portal, the script doesn't run and the values are not populated. Trying to find out what causes this trouble. If you have encountered any such situation, then please advice if you know any workaround.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2018 11:43 AM
Can you post the script you're using to make these value changes with the onChange?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2018 02:27 PM
Thanks for asking. I have fixed it with help from other community members. Its about setting the UI Type as All (Desktop and Mobile / Service Portal) option. I previously set it to Desktop only.