Attachment template new row If expression?

Hello,

I am using an attachment template in workflow rule.
I have multiple tables created in this template, some are only created if they have content, such as:
3X_3_8_38b2da86fcdecd200a3ade0f0171e4890cc6bd8e.png
Which works exactly as I anticipated.

My issue now is I have a table that is always created but some rows should only be produced if they have contents. (Not doing this results in a large number of unsightly empty rows.)
Here is my attempt:
3X_2_9_29a406e22a7524c374f594f6b58813f13f040d38.png
and the result:
3X_1_4_14f5a8ab8648027d9cb013a7aa910c33a95ec74d.png

I am sure Im on the right track with my technique. I am unsure where to place it and would like confirmation that I am not missing anything else. As you may know templates are harder to self troubleshoot over in app issues.

Any help is appreciated, thank you.

0 5 276
5 REPLIES 5

Steve
Platinum 4
Platinum 4

This sounds like a problem for template master @Aleksi!

There is no nice and easy way to build this because if you use IF: & EndIF formula in the row #3 for example, it just clears the row if I remember it correctly, but it keeps it as a blank row.

Unfortunately you need to create 4 separate tables where the first one is shown only if you have just two rows as Template Pty Ltd and Manager. If you have 3 rows to show, show that one etc. There is another thing to remember because any of those 3 rows can be shown or all of them, you need to add an internal IF statement which rows to show.

Soโ€ฆ you need to have two separate IF โ€œlevelsโ€โ€ฆ first one is for how many rows do you have in overall and another one is for checking what of those 3 rows you need to show. As you can see, not very nice trick.

Thank @Aleksi

So your solution to clarify is:
Table is for example 4 rows deep, then I would create 4 seperate tables.
Table 1 containing 1 row
Table 2 containing 2 rows
etc.

Using If Statements to determine how many rows contain data and so determining which size table to show?
If I am correct in my assumption of what you are saying it would turn my 20 page document into 100 pages pretty quick haha, quite a few long tables within.

My only other option I can think of is separating every row in every table into its own table and determining with an IF statement whether it contains data and hence should be shown. I think I have done something similar before but from memory the tables top and bottom edges sit next to each other turning a single pixel thick border into a two pixel thick border on the top and bottom of the table (also known as really ugly)

That is unless anyone else has a better idea

Itโ€™s true that your other option will be quite ugly because border lineโ€™s positions wonโ€™t math.

I have one ideaโ€ฆ let me test if that could work.

@SKETCHwade If you change your template from โ€œreading one valueโ€ to โ€œStart: & Endโ€, with this method you will be able to remove blank rows. Though you can write โ€œCOL#1โ€ directly without <<TEXT(โ€œCOL#1โ€)>>. I was just testing it with that way for other purposes

Top Labels in this Space