how to get RITM variable in script include

keval3
Tera Contributor

Hi All,

 

Please let me know how to get RITM variable in script include.

keval3_1-1735732093218.png

 

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

5 REPLIES 5

Voona Rohila
Kilo Patron
Kilo Patron

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

OmkarC
Tera Guru

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.

 

Thanks,
Omkar

Ankur Bawiskar
Tera Patron
Tera Patron

@keval3 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

 

I will have to add that syntax in my script include?