- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2021 12:23 PM
- The Internet has a lot of resources around ServiceNow's Service Catalog and Table REST APIs.
- The Internet also has a growing number of resources around ServiceNow's Multi-Row Variable Sets (MRVSs).
What I can't find are mentions of getting or setting values within an MVRS using a REST API. When I try pulling an RITM with "variables.[my MRVS name]," I get back an empty string.
Does anyone know if we can or can't access Multi-Row Variable Set values through an out-of-box REST API?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2021 01:02 PM
UPDATE: I just successfully put values into the MRVS using the Buy Now API!
Here's the request body I included (using the raw JSON option in Postman):
In my catalog item, "products" is the MRVS name and "product_name" is the name of a variable in that set.
The syntax around quotations is essential (since the entire value assigned to "products" is a single JSON string).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2021 01:02 PM
UPDATE: I just successfully put values into the MRVS using the Buy Now API!
Here's the request body I included (using the raw JSON option in Postman):
In my catalog item, "products" is the MRVS name and "product_name" is the name of a variable in that set.
The syntax around quotations is essential (since the entire value assigned to "products" is a single JSON string).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 09:44 AM
So if there were multiple variables for a row how would that look. In your example if products had multiple variables such as product_name, product_description for each row. ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 01:39 PM - edited 10-30-2023 01:47 PM
Good question! Using the latest Order Now API, my guess is to make this your JSON request body:
{
"sysparm_quantity": 1,
"variables": {
"products": "[{\"product_name\":\"test!\",\"product_description\":\"first product description\"},{\"product_name\":\"test 2!\",\"product_description\":\"second production description\"}]"
}
}
I didn't actually test that, but I'd hope you could add more name-value pairs within each curly-braced "row"--separated by just a comma. I'm curious to know if that works!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2023 03:29 PM - edited 03-27-2023 03:34 PM
Hi Mike,
how did you manage GET call for MRVS
Were you able to do a GET with variables.[MRVS name] ?