How to fetch variable values from Ritm table in service now

How to fetch the variable values from RITM ticket in servicenow

Hello Venkat,
If you want to work with variables from ServiceNow you have 2 options one RITM dedicated activities:

You have dedicated activities for ServiceAPI:

And you have a long approach with Table API:

Thanks,
Cristian Negulescu

Hi Cristiian,

I want to get variables data from SCTASK number / Requested Item-RITM0number and store in datatable

As per below screenshot, Which i can use in my scenario under which activity
Options table [ sc_item_option].
" Variables " ([item_option_new])
Many-to-Many table [sc_item_option_mtom]

I have tried to user get varaibles activty but it shows all variables but naming not understandable, which one is best and how to write query also

Confirm with correct query ?
“SELECT name,nws,first_name,last_name,hana,sap_bw_hanas
FROM sc_item_option_mtom WHERE active=true"

1 Like

Hello Deepthi,
Sorry for the late answer but I have been on a long holiday.
So the idea is like this the SQL is just an interface by me on top of ServiceNow Protocol. For particular cases, you need to use the RAW REST API ServiceNow protocol and you have a video for this here:

here are some examples of use cases: ServiceNow automation with UiPath | REST API command | Use cases | Incident cases | RPA ServiceNow - YouTube
About the logic with the variables I think I have 2 movies and here is all that I know because is not simple stuff and I don’t have experience in SNOW:
ServiceNow variables called from UiPath | Get Variables | Update Variables | Table variables logic - YouTube
Create Requested Items (RITM) in ServiceNow with UiPath - YouTube
Thanks,
Cristian