HTML textbox for merge templates > in tags

If you think that something doesn't work in Aware IM post your message here
Post Reply
JoshK131
Posts: 47
Joined: Tue Jan 26, 2021 11:09 pm

HTML textbox for merge templates > in tags

Post by JoshK131 »

Hello.

I have the following html text stored in an attribute with and html editor.

<p>&lt;&lt;IF Work.StartDate > 01/04/2024 AND Work.Frequency IS DEFINED AND Work.PricePerService > 1.00 AND Work.ps_ModuleStatus.Status = 'Work Won Regular' THEN SHOW SECTION_START&gt;&gt;</p>


However, when i go into edit the raw html again, > is changed to &gt; like so
<p>&lt;&lt;IF Work.StartDate &gt; 01/04/2024 AND Work.Frequency IS DEFINED AND Work.PricePerService &gt; 1.00 AND Work.ps_ModuleStatus.Status = 'Work Won Regular' THEN SHOW SECTION_START&gt;&gt;</p>

I use the html in this manner:
OutgoingEmail.Message = EmailTemplate.Message

OutgoingEmail.Message is populated with all the tag expresssions normally.

The entire HTML has no issues as I am able to export it as a document.
I think the attribute being an html editor is just doing some text processing in the backend.

Any way to help with this would be great.

Thank you
PointsWell
Posts: 1473
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: HTML textbox for merge templates > in tags

Post by PointsWell »

https://www.awareim.com/dokuwiki/doku.p ... nside_tags

You have to place double chevrons << >> around rules in html
JoshK131
Posts: 47
Joined: Tue Jan 26, 2021 11:09 pm

Re: HTML textbox for merge templates > in tags

Post by JoshK131 »

In plain text attributes using html editor, << and >> are converted to &lt;&lt; and &gt;&gt;
That works.
Its when i want to use the < and > symbols inside the tags where it does not work.
PointsWell
Posts: 1473
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: HTML textbox for merge templates > in tags

Post by PointsWell »

What happens if you change the EmailTemplate.Message to just be plain text. If the OutgoingEmail.Message is HTML should it not just pickup the formatted text?
JoshK131
Posts: 47
Joined: Tue Jan 26, 2021 11:09 pm

Re: HTML textbox for merge templates > in tags

Post by JoshK131 »

Getting this error.

Im not sure why.

com.bas.shared.ruleparser.ParseException Semantic analysis for the attribute Work.ServiceDay has not been performed.

The customer also edits the email templates so keeping the html editor is better.
JoshK131
Posts: 47
Joined: Tue Jan 26, 2021 11:09 pm

Re: HTML textbox for merge templates > in tags

Post by JoshK131 »

I think the issue is with SHOW SECTION_START.

Ill have an attribute storing HTML which uses SHOW SECTION_START.
If i remove SHOW SECTION_START then it works.
If i keep it, i get the semantic error.

Maybe SHOW SECTION_START isnt supported when used like this?
Post Reply