Auto populate a variable based on form answers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2025 03:43 AM
Hi all,
I'm trying to get a variable to auto populate, with free text, dependent on the answers from previous questions.
Getting the auto populate is easy enough using a UI policy. However I want to be able to add multiple, but it just over rides them. As well as this it doesn't remove it if i unselect it.
Has anyone any tips on how to solve this?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2025 05:29 AM - edited 03-11-2025 05:29 AM
You will need to do this with an onChange Catalog Client Script that checks the value of all of the variables involved, then updates the variable to populate. Once you get the script worked out you'll need to copy it so that it triggers onChange of each dependent variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2025 06:21 AM
I will suggest rather than having multiple onChange client script to populate, why not populate it after submission using single business rule or workflow run script.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader