Page 1 of 1

Question about email template. **solved**

Posted: Wed Oct 18, 2023 2:55 pm
by chrysnic
Hello,

I am preparing an email template that I will use with an "Email Event" on an MB PRO2.

In this template, I would like to use this type of text:

Daily weather report for [YYYY]-[MM]-[DD]

However, instead of today's date (as designated by DD), I would like to use the PREVIOUS DAY's date, i.e., something like "DD-1".

What is the syntax to achieve that? And also, what would happen on the first day of each month, where the previous day would change not only DD, but also MM?

Any help would be appreciated!

Re: Question about email template

Posted: Wed Oct 18, 2023 4:32 pm
by admin
When you use the periodic event "after each new day" the variables should resolve to the just finished day, not the new one.

When selecting an export result or a generated chart a mail containing that as an attachment is generated and is given the name of the attachment as email subject. The chart cannot be included into the mail body and also email subject is determined by the chart/export file name.

Re: Question about email template

Posted: Thu Oct 19, 2023 7:41 am
by chrysnic
Thanks for the reply!

Unfortunately, it did not work. I used the periodic event "after each new day", but the string [YYYY]-[MM]-[DD] resolved to the new date, not the previous (just finished) day. Is there any other way to print the previous day's date?

I guess a less-than-optimal way would be to use the periodic event "before each new day", but it would be nice if there were a "formal" way.

Thank you very much for your time and help.

Re: Question about email template

Posted: Thu Oct 19, 2023 6:08 pm
by admin
sorry, I was thinking wrong here, "before each new day" is the option to go. This is triggered when the day has passed, so you don not miss any data from previous day.

Re: Question about email template

Posted: Fri Oct 20, 2023 12:10 pm
by chrysnic
Thanks! I confirm that the "before each new day" option has solved my problem.