Some variables are not getting populated on RITM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello Community,
I am facing an issue with RITM variables. The requirement is that some variables should be populated based on RITM state.
What I tried:
- I created UI Policies to populate variables when the state changes
- However, the variables are not behaving as expected. Some are not showing, and some are not populating even though the conditions are met.
Question:
- What is the best approach to make RITM variables show based on state change?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @as001072015 ,
For the issue you are facing, there might be conflicting conditions, check the conditions possibly one by one or ensure no conflicting condtions are there, you may need to check the script written on client scripts.
To show variables based on state change, use onLoad or onChange Catalog Client Scripts on the RITM form.Use g_form.setVisible('variable_name', true/false) or g_form.showFieldMsg() to show/hide variables as needed.
Thanks,
Bhimashankar H
-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you want to show/hide then use UI policy or onChange client script.
But if you wish to populate/update then you need server side code such as business rule etc
which variable should get populate based on state change?
You can use before update BR on RITM table with State condition and set the variable like this
current.variables.variableName = 'Your value';
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