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

hollysnyder
Mega Guru

Hi Abdul,

I am working on the same functionality. Were you able to get this working?

Thanks!

Holly, I'm not sure if my reply makes sense, however if it does not I'd also open a new thread on this so you can ask the particulars about what it is specifically you're doing that isn't working.

Hi Holly:

You may be interested in my article: Multi-Row Variable Sets: Composing approval and task descriptions

I commented in another thread related to this but I'm not sure if you get notified when that happens.

 

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!

If I use a reference field for variable, how to I get the display value. 

I have tried varName[i].variable1.getDisplayValue()

But it gave me undefined.