Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to insert values of multi row variables through Rest API ?

SK36
Tera Contributor

Hi Experts,

we are using scripted Rest API to create a requested item.

I am able to insert values for all the variables except multirow variables.

Can anyone suggest on how to achieve this ?

1 ACCEPTED SOLUTION

Aman Kumar S
Kilo Patron

You can follow below article for correct MRVS format:

{
"sys_id" : "039c516237b1300054b6a3549dbe5dfc",
"sysparm_quantity" : "1",
"variables" : {
"slt" : "slt_value",
"slt2" : "slt2_value"
"mrvs" : "[{\"slt3\" : \"slt3_value\"}]"
}

Populate variable set variables via REST for Service Catalog API

Also:

https://community.servicenow.com/community?id=community_question&sys_id=3141a0b5db0f6810ddb1d9d96896...

Best Regards
Aman Kumar

View solution in original post

1 REPLY 1

Aman Kumar S
Kilo Patron

You can follow below article for correct MRVS format:

{
"sys_id" : "039c516237b1300054b6a3549dbe5dfc",
"sysparm_quantity" : "1",
"variables" : {
"slt" : "slt_value",
"slt2" : "slt2_value"
"mrvs" : "[{\"slt3\" : \"slt3_value\"}]"
}

Populate variable set variables via REST for Service Catalog API

Also:

https://community.servicenow.com/community?id=community_question&sys_id=3141a0b5db0f6810ddb1d9d96896...

Best Regards
Aman Kumar