Hello, I’m looking for a way to hide sections of an email template when there’s no data populated. Can someone assist? A million thanks!
Please elaborate what the template START contains- there is not enough info to assist.
the template is based on the job order table and the only start expressions are in the sections with the black headers: here’s the detail:
@Daisy_Ramirez
Out of each table; construct an IF statement with COUNT expression:
<<If: COUNT(SELECT(Tablename[Key], {Y/N Condition}) > 0>>
and at the end of each table, close the IF statement
<<EndIf>>
Thanks Levent, do you mean place the IF statement before and after each section?
Correct
Levent this worked perfectly! Thanks a million!
You’re welcome @Daisy_Ramirez
Hi Levent, hope all is well. Just noticed, those “empty” email sections are appearing again on my report. Here’s a copy of the finished report with the empty sections and the template with formulas. The only thing I updated a week or so ago is I added the OrderBy to the section’s start expression. Could this cause the IF formulas to stop working?
Absolutely Daisy.
The point of the <<If>>
expression is to exclude everything that follows up to the <<EndIf>>
when the <<Start>>
does not return any records. That only works if the <<If>>
is counting exactly the same records that the <<Start>>
returns.
I strongly suspect that your change to the <<Start>>
no longer matches the <<If>>
.
User | Count |
---|---|
39 | |
28 | |
23 | |
23 | |
13 |