how to get RITM variable in script include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 03:50 AM
Hi All,
Please let me know how to get RITM variable in script include.
my requirement is base on above variable (HR Subcategory) resolution notes should be auto populated.
kindly let me know how to do it.
Thanks & Regards
KP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 04:24 AM
Hi @keval3
You can access variable with the RITM object as below
var x = ritmobj.variables.variable_name; //replace variable_name with the variablename of the hr subcategory
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 05:03 AM
Hi @keval3 ,
We can access the RITM variables in script include as follows.
var ritmVar = objectName.variables.variableName //Please replace objectName and variableName according as per your code
If my response helped please mark it correct and helpful.
Omkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 06:07 AM
can you share your script which didn't work?
syntax on how to access the variable value is already shared by other members
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 06:12 AM
Hi Ankur,
I will have to add that syntax in my script include?