Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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

I'm sorry I never received a notification about this question. I have not used a reference field in a MRVS yet, so I do not have a solution for this at this time. I would need to tinker with it in my personal dev instance. I would be interested in knowing if you were able to find a solution to this.

Thanks!

Not at. I’m still trying to figure out how to get the name instead of sys_id

Hi Holly, I have a question regarding your solution above.

What if I am not using a record producer and simply using a MRVS with multiple variables and want the value of each row entered to be displayed in the description field WITH a header row off course?

Hi Shiraz,

If I'm understanding your question, you can change the order in which the Variable1, Variable2, and Variable3 and the varName[i].variable1, varName[i].variabl2, and varName[i].variable3 are displayed. You would just need to reorder in the script with the appropriate "\n" inserted where you want a new line.

However, this is not going to space them out appropriately, so instead, you'll end up with a "table" that looks like this:

Variable1 Variable2 Variable3

<<varName[i].variable1>> <<varName[i].variabl2>> <<varName[i].variable3>>

That's why I went with displaying the information in the appropriate rows instead of doing information in columns.

I hope this makes sense!

Hi, have you gotten/tested this solution to work in New York?   I have had a few multi-row variable sets working fine, but after upgrade now, it blocks my ticket.   the values get into the ticket from record producer, but i am not able to assign, or update the ticket created from record producer. if i remove the MRVS it works.