Inserting data from a Multi-row variable set on a Record Producer into a Description field

Abdul30
Kilo Contributor

Hello, 

I am still very new to using the Multi-row variable set and am having some difficulty displaying the captured data to a record. Essentially I want to use the Multi-row variable set to create a Case (or any record) through the record producer and then display the content entered in the multi-row variable set into the description field (or any other text field) of that record. 

Is it possible to access the Mutli-row variable set data and loop through it row by row? 

Any help is much appreciated. 

Thanks,

Abdul

1 ACCEPTED SOLUTION

hollysnyder
Mega Guru

Hi Abdul,

I was able to get this working using this script in the script field on the Record Producer:

 

var varName = JSON.parse(producer.mrvs_name);
var description = '';
for(var i=0;i<varName.length;i++){
description += "\n Variable1: " + varName[i].variable1 + "\n Variable2: " + varName[i].variable2 + "\n Variable3: " + varName[i].variable3 + "\n";
}
current.case_field = description;

 

Hope this helps!

View solution in original post

20 REPLIES 20

Hi Holly,

 

As abdul is trying to populate the values into the description field of the case, I am here trying to populate a variable (not part of any variable sets) on the record producer with a value from the Multi row. I am not able to accomplish using the client script. Could you please let me know if you have idea on solving this issue.

 

Thanks

 

Harish Gubba 

bts1
Tera Contributor

not working for record producers in scoped application. any suggestions would be helpful.

hganjam
Tera Contributor

I think it is working fine me.

Abdul30
Kilo Contributor

@hollysnyder thanks, this is a much better approach!

Priyanka138
Mega Expert

@hollysnyder - Hi Holly . 

Where do you capture the above script? What do you mean when you wrote "script field on the Record Producer"

Is it a Catalog client script you are referring OR aan attribute of a field?

-Priyanka