how to present a table with dynamic data in email templates.?

Hi All,

I have a script that generates data dynamically and this data is presented in a HTML table. I am passing this table structure i.e. a string format as a parameter to an email template. But , the HTML is not being rendered as I wanted rather it's displaying the html tags directly in the email. How can an user defined HTML content be displayed in the email template in 1IM?

Thanks in advance.!

Regards,

T.Sudhir

Parents Reply Children
  • In 7.1.3 this is complicated as the $Script()$ scheme always returns the escaped HTML code. So with 7.1.3 you would need to write your own placeholder-replacement script (and process chain to send out the mail) that replaces your custom replacement markers in your mail - template with your custom HTML code. Can be done, had been done by partners and customer but is somewhat complex.

    Starting with 8.1 we added a new feature that allows you to explicitly disable the HTML-escaping in the $SCRIPT()$ scheme.

    DialogScript
     Called in mail-template with
    Public Function CCC_HtmlMailText(obj As IEntity) As String
      Return "<h1 style='color:red'>" & obj.Display & "</h1>"
    End Function
    $SCRIPT(CCC_HtmlMailText):HTML$

    Please be aware that there is no security check in-place then and you need to take of care of that when you construct the HTML data.

  • Thanks for the reply Markus. But, was wondering is there any example for this in 7.1.3?

  • Take a look at the Script VI_SendReminderMailsToAttestors that is used in the process VI_Attestation_Person initialize summary mails to remind approvers

    It is creating a table inside of a prepped mail-body as described above.