Convert Html code in expression rule

Certified Senior Developer

Hi Team,

I am trying to convert html code in my email template to dynamic so i can loop some values using expression rule but i facing some issue in syntax , Looking for the help

below is the html code

<!DOCTYPE html>
<html>
<body>
<head>
<link rel="stylesheet" href="styles.css">
</head>

<h2>###bodytext###</h2>

<br>
<br>
<h2>Please click on any below link to submit you response</h2>

<a href="mailto:processmodeluuid0002e98e-199e-8000-273d-7f0000014e7a@cscswdev.appiancloud.com?subject=###resultId###&body=Please don't edit subject and To-email Address, Please add your comments below">Complete</a>
<br></br>
<a href="mailto:processmodeluuid0002e98e-199e-8000-273d-7f0000014e7a@cscswdev.appiancloud.com?subject=###resultId###&body=Please don't edit subject and To-email Address, Please add your comments below">Cancel</a>

<br>
<br>
<a href="mailto:processmodeluuid0002e98e-199e-8000-273d-7f0000014e7a@cscswdev.appiancloud.com?subject=###resultId###&body=Please don't edit subject and To-email Address, Please add your comments below">Comments</a>


</body>
</html>

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Seems like you want to send this by email. The "Send Email" smart service can read your template and allows you to replace the placeholders. Did you try that?

  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    yes stefan, thats works fine but would like to create href links dynamically to pass value from array below is new code i tried

    "
    <html>
    <body>
    <head>
    <link rel="stylesheet" href="styles.css">
    </head>

    <h2>###bodytext###</h2>

    <br>
    <br>
    <h2>Please click on any below link to submit you response</h2> "

    &

    a!forEach(
    items:ri!methods,

    expression :

    <a href="mailto:processmodeluuid0002e98e-199e-8000-273d-7f0000014e7a@cscswdev.appiancloud.com?subject=###resultId###&body=Please don't edit subject and To-email Address, Please add your comments below">fv!item</a>
    )
    &

    </body>
    </html>"

Reply
  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    yes stefan, thats works fine but would like to create href links dynamically to pass value from array below is new code i tried

    "
    <html>
    <body>
    <head>
    <link rel="stylesheet" href="styles.css">
    </head>

    <h2>###bodytext###</h2>

    <br>
    <br>
    <h2>Please click on any below link to submit you response</h2> "

    &

    a!forEach(
    items:ri!methods,

    expression :

    <a href="mailto:processmodeluuid0002e98e-199e-8000-273d-7f0000014e7a@cscswdev.appiancloud.com?subject=###resultId###&body=Please don't edit subject and To-email Address, Please add your comments below">fv!item</a>
    )
    &

    </body>
    </html>"

Children