how to set Value for variables in RITM those are submitted?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 11:25 PM
Hi Team,
how to set Value for variables in RITM those are submitted?
I want to set value for company name ServiceNow variable field
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 11:35 PM
-
If the request is already closed, no changes should be made. Once it's done, it's done. Don't add this value either through a script or any other method, as that could trigger an unnecessary audit process.
-
If the request is still open and you're confident the same value applies to all requests, you can handle this easily from the list view. Add the variable to the list view, use "Update All" or select the rows, click the dropdown arrow, and update the value directly—no script needed.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2025 12:21 AM
Your requirement is not clear but I am assuming that once RITM is submitted and company in servicenow company field is empty then update the RITM variable company.
You can do this by adding it your business rule for RITM table as below:
This is just an example you can add the business logic as per your requirement.
(function executeRule(current, previous /*null when async*/) {
if(current.variables.company_name=="")
{
current.variables.company_name=current.caller_id.company.name;
}
})(current, previous);
Regards,
Sourabh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2025 12:24 AM
you can use background script and set it
how is it getting fetched?
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