Place Multi Row Variables in Email Script

kevinthury
Tera Guru

I have a Record Producer with a Multi Row Variable Set (MRVS) that is creating an HR Case.  The resulting case requires an Approval needed prior to being fulfilled.  I have been asked to include the contents of the MRVS in a readable, table format on the approval email.  The email script I have is able to pull in the contents the MRVS.  I am struggling in outputting those values into a table format. 

The first image below is the script where the mrvs is declared and then parsed (lines 11-13).  Beginning at line 26 is where I am trying to place the contents in a table format.

The second image is the preview from the notification.  The contents under description is simply for me to see that the comntents of the mrvs are being captured.  The ADJUSTMENT DETAILS is the output.  It's displaying the actual text as noted in line 28. 

Any suggestions on displaying the contents of the MRVS in that table?

 

EMAIL SCRIPT

find_real_file.png

 

RESULTS

find_real_file.png

1 ACCEPTED SOLUTION

rahulpandey
Kilo Sage

The reason you are seeing the literal variable than value is because you are printing it as it is.

example: 

mrvsParse[i].date_cal  = "rahul";

template.print("<table>"+mrvsParse[i].date_cal+"</table>"); // this will print rahul in example table

template.print("<table>mrvsParse[i].date_cal</table>");// this will printmrvsParse[i].date_cal in example table

View solution in original post

8 REPLIES 8

rahulpandey
Kilo Sage

The reason you are seeing the literal variable than value is because you are printing it as it is.

example: 

mrvsParse[i].date_cal  = "rahul";

template.print("<table>"+mrvsParse[i].date_cal+"</table>"); // this will print rahul in example table

template.print("<table>mrvsParse[i].date_cal</table>");// this will printmrvsParse[i].date_cal in example table

kevinthury
Tera Guru

Thank you very much!  The syntax you provided is correct and the values from the MRVS are being output as needed.

 

joedumond
Tera Contributor

would you mind sharing your completed script as well as the script for the approval buttons?

I have the same exact requirements, have found this extremely helpful but am also at the same point but dont know how to edit the script to fix it per rahul's notes

 

Script attached to thread