Hi,
I am using send e-mail smart service to send an email notification which is internally using HTML template.
Initially, I have designed a template with few variables using ### and which are working perfect.
Later on I have added few more variables, but these variables are getting replaced with values sometime and sometimes those are not loading.
I have even tried to click the option "Re-Scan Template" and it worked for some time and again after some time it is not working.
Can someone advice on this. Thanks.
Discussion posts and replies are publicly visible
Hi Hari Kishore,
Usually the HTML template will not work properly any time an update is made to that template, to work HTML template properly you need to re-scan the template every time you update the template.
To avoid this situation I would suggest use Appian expression rule to construct your email body. This will give more control to handle you email content, you can use HTML tags to make your content different styles (Ex: Bold, Italic, links, different color etc...) See below for sample code to construct email body in expression rule.
concat( "The is sample text ", "<br>", char(10), "<br>", char(10), "<b>", "Title1: ", "</b>", pv!titleDescription /*your pv to map*/, "<br>" & char(10), "<b>", "Title2: ", "</b>", pv!titleDescription2 /*your pv to map*/, "<br>" & char(10), "<br>" & char(10), "This is end of text", "<br>" & char(10), "<br>" & char(10), "Regards, ", "<br>" & char(10), "Your Sender" )
It seems to be it is also a not a perfect solution.
I have defined an expression rule along with rule inputs and passed all the required PV variables as parameters to the rule input.
After words, I got the below message.
Is there any perfect and alternative solution for this.
Hi Naresh,
Let me know if you need any further information on this.
Thanks.
Hi Hari,
Can you send us the email body content not the expression rule.
Expression rule:
Email body code:
Can you send the actual email body, not the image. you can inset your code using insert option.
You can replace any sensitive content with other text if any
In your code at line no 9 I see an "=" can you remove that "=" and try
I tried,
still I am getting same error
Code is there in a restricted system, so I can't bring the code here.
Ok Understood. with out seeing your code it is hard to find the root cause. Other alternative way is
hope this will solve your issue
It seems to be this idea is working. I have to complete full blown solution before confirmation.
I am entering the below lines of code in the expression editor, my code is getting trim by default and I am encountering the issue.
Is there any limit on the number of characters on the expression editor?