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.

Flow Submit Catalog Item Request action and populating Multi Row Variable Set (MRVS)

Community Alums
Not applicable

I have a Flow script action where I am parsing a spreadsheet and creating an array of Contractor objects (First Name, Last Name, Phone, Email).

 

I would like to then use the Submit Catalog Item Request Flow action to create a new request, and populate a MRVS on the request with the values from the spreadsheet.  I have tried different variable names and object names but I am not able to populate the MRVS.  The request record gets created, but the MRVS is blank.  Is there a trick to this?

 

ShawnMc_0-1676086734366.png

ShawnMc_1-1676086872248.png

 

 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

I figured it out.  If you click the "+" button next to the array object (Contractors) in the action, it will create edit fields where you can manually enter values to create a record (Contractors 1).  This will display the field names that the action is expecting.  In my example it is expecting first_name, last_name, phone, email.

 

Once I changed my script action to match these field names, the process worked and it created the MVRS records for the request item.

 

ShawnMc_0-1676299452012.png

ShawnMc_1-1676299600729.png

 

View solution in original post

3 REPLIES 3

Laszlo Balla
ServiceNow Employee
ServiceNow Employee

Check out this post on how to use scripting to set MRVS.

Alternatively, you can try creating records on the 'sc_multi_row_question_answer', where each question of the MRVS would be separate record.

Community Alums
Not applicable

I figured it out.  If you click the "+" button next to the array object (Contractors) in the action, it will create edit fields where you can manually enter values to create a record (Contractors 1).  This will display the field names that the action is expecting.  In my example it is expecting first_name, last_name, phone, email.

 

Once I changed my script action to match these field names, the process worked and it created the MVRS records for the request item.

 

ShawnMc_0-1676299452012.png

ShawnMc_1-1676299600729.png

 

Community Alums
Not applicable

I also found that the variable set name must match the array.object name that is returned by the script.  If they differ it will not work.

ShawnMc_0-1676478899120.png