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

Michael-PHL
Tera Guru

Could you share this script? I am in the middle of trying to build the same thing.

Script attached to thread

kevinthury
Tera Guru

I've attached a .txt file of the email script I use.

Thanks so much!!