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.

Cannot access Multi row variable set values into BR from service portal

Bharath Reddy M
Tera Contributor

Hello,

 

I'm trying to access the MRVS values in BR, this MRVS is on a record producer, when i'm using current.variables.variableset from backend it is accessing the values, but when i'm trying to create a record from service portal at that time this BR  for current.variables.variableset is giving me undefined. Any help on this will be greatly helpful

BharathReddyM_0-1719310516692.png

Line number 4 i mean to ask 

2 REPLIES 2

Slava Savitsky
Giga Sage

Where exactly are you running that code and what is the trigger?

Bhavani Shankar
Tera Guru

Hello Bharath,

 

Value of Variables will be a string . Whereas, value of a variable set(MRVS) will be in an Array

 

So, considering select_non_serialized_assets to be your MRVS name you will have to navigate through the value like this... 

 

var slctdNonserialized = current.variables.select_non_serialized_assets[0]; //line 4

//You will get the JSON here or you can further dot-walk to the variables of MRVS

 

Please hit the thumbs up if this helps.😀 

 

Regards,

Bhavani Shankar

Regards,
Bhavani Shankar
Linked In