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
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?
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>
<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>"
So you want to replace "###resultId###" with some dynamic value? Did you try the substitute() function?
i am able to pass the value , the issue is having some syntax error in html code i generated in expression rule, that is place
You can escape quotes in strings using double-quotes like this:
" this is a single quote "" inside a string"
stefan, able to generate the template, the only issue is when i click on toemail link , i was not able to populate the body, can you help over that
=concat(
"<html>","<body>",
"<h2>" & pv!GBL_VW_RevenueRecoveryResult.bodytext & "</h2>",
"<br/>","<br/>","<h2>Please click on any below link to submit you response</h2>",
a!forEach( items: split(pv!GBL_VW_RevenueRecoveryResult.linktext,","), expression: concat( "<a href =",
"mailto:processmodeluuid0002e98e-199e-8000-273d-7f0000014e7a@cscswdev.appiancloud.com?subject=", pv!GBL_VW_RevenueRecoveryResult.actionresultid , "&body= Please dont edit subject and To-email Address, Please add your comments below>" , fv!item , "</a >", "<br/>", "<br/>" )
) ,
"</body>","</html>")
i need to show user in email body Please dont edit subject and To-email Address, Please add your comments below when they click
HTML parameters require quotes. I think you miss them at the highlighted spots.
tried with below logic <a href='" &concat(local!tomail,local!body)& "'>" & fv!item & "</a>" , working fine
Thanks stefan for help