- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 09:45 PM
Hi All,
I have a catalog with Muti Row variable set, I want the information stored in the multi row variable set of submitted RITM. I can extract this information using flow designer's get catalog variable action but I want to get this using PowerShell RESTAPI.
I've tried using below code but I'm not able to get the values from it.
$instance = "https://servicenow.com"
$snowuser = "user"
$snowpassword = "password"
$ritmNumber = "RITMXXXXXXX"
# Authentication setup
$pair = "${snowuser}:${snowpassword}"
$encodedAuth = [Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
$headers = @{
Authorization = "Basic $encodedAuth"
"Content-Type" = "application/json"
Accept = "application/json"
}
# Get RITM sys_id
$ritmUrl = "$instance/api/now/table/sc_req_item?sysparm_query=number=$ritmNumber&sysparm_fields=sys_id"
$ritmResponse = Invoke-RestMethod -Uri $ritmUrl -Headers $headers -Method Get
$ritmSysId = $ritmResponse.result.sys_id
# Get MRVS sys_id from sc_item_option_mtom
$mtomUrl = "$instance/api/now/table/sc_item_option_mtom?sysparm_query=request_item=$ritmSysId"
$mtomResponse = Invoke-RestMethod -Uri $mtomUrl -Headers $headers -Method Get
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 05:30 AM - edited 06-05-2025 05:31 AM
I used it for Form variables. I think it is not working for MRVS. Now, only possible option is to access "Multi Row Question Answers" table:
User the Below URL:
https://<instance>.service-now.com/api/now/table/sc_multi_row_question_answer?sysparm_query=parent_id%3D<sys_idof RITM>&sysparm_display_value=true&sysparm_exclude_reference_link=true&sysparm_fields=item_option_new%2Cvalue%2Crow_index&sysparm_limit=10
In your code I noticed that you have RITM number. If you don't have sys_id of RITM, then run the API already shared to get the sys_id and then use this api for MRVS.
This API returns each variable as separate line. Eg it you MRVS has 5 variable and you have 2 rows then this returns 10 record.
row_index value from the return JSON will give you the particular row number. It will be same for all the variables in a particular row and it is a random integer. Use this row to identify the row and then take variables value from each entries
Palani

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 02:56 AM
Hi,
You can get the variable details from sc_req_item directly. Refer the below code
$ritmUrl = "$instance/api/now/table/sc_req_item?sysparm_query=number=$ritmNumber&sysparm_fields=sys_id,variables.mrvs_internal_name"
// Replace mrvs_internal_name with actual MRVS Internal Name
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 04:46 AM
$ritmUrl = "$instance/api/now/table/sc_req_item?sysparm_query=number=$ritmNumber&sysparm_fields=sys_id,variables.server_details"
$ritmResponse = Invoke-RestMethod -Uri $ritmUrl -Method Get -Headers $headers
$ritmResponse.result
I've tried it but it's simply returning the RITM's sysid.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 05:30 AM - edited 06-05-2025 05:31 AM
I used it for Form variables. I think it is not working for MRVS. Now, only possible option is to access "Multi Row Question Answers" table:
User the Below URL:
https://<instance>.service-now.com/api/now/table/sc_multi_row_question_answer?sysparm_query=parent_id%3D<sys_idof RITM>&sysparm_display_value=true&sysparm_exclude_reference_link=true&sysparm_fields=item_option_new%2Cvalue%2Crow_index&sysparm_limit=10
In your code I noticed that you have RITM number. If you don't have sys_id of RITM, then run the API already shared to get the sys_id and then use this api for MRVS.
This API returns each variable as separate line. Eg it you MRVS has 5 variable and you have 2 rows then this returns 10 record.
row_index value from the return JSON will give you the particular row number. It will be same for all the variables in a particular row and it is a random integer. Use this row to identify the row and then take variables value from each entries
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 05:40 AM
1 way is to create a scripted REST API and you can get the details in 1 endpoint itself by passing RITM number
How to fetch Multirow variables on RITM/SCTASK using REST api
you can't get it directly using RITM Table API
1) 1st get the RITM sysId using number etc
2) then use Table API on Multi Row Question Answer [sc_multi_row_question_answer] with parent_id=RITM SysId
Old thread where I shared the approach
Access multi-row variable set from RITM using Rest API explorer
Example below
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