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 do I update a the multi row variable set data of a RITM?

Ravish Shetty
Tera Guru

we have a catalog which has multi row variable sets. we are looking at creating RITM's against this catalog using Cart API.

how do we update the muti row variable set of the RITM when creating these RITM's programatically?

 

Thanks,

Ravish

1 ACCEPTED SOLUTION

DrewW
Mega Sage

If memory serves the system stores the MRVs as a JSON formated string.  So you should be able to just do something like

var m = JSON.parse(current.variables.MRVS_NAME);

m[0].somevarinmrv = "asdflkahsdlkfjasd";

current.variables.MRVS_NAME = JSON.stringify(m);

 

View solution in original post

2 REPLIES 2

DrewW
Mega Sage

If memory serves the system stores the MRVs as a JSON formated string.  So you should be able to just do something like

var m = JSON.parse(current.variables.MRVS_NAME);

m[0].somevarinmrv = "asdflkahsdlkfjasd";

current.variables.MRVS_NAME = JSON.stringify(m);

 

thank you