How could I making a table in template doc visible only if certain conditions are met?

Hello!

My template has a table where I also have some fix data but also dynamic row (I used Start (Select) -  End expression).

Because of the fix data, even if I have expressions using <<IF:>>, the lines oft my table are displayed in my pdf file as empty lines, and it is not ok; how could I also hide the empty lines from my table in my pdf? Or how could I hide the entire table?

Thank you for your help!

Best regards!

Ruxandra

 

Solved Solved
0 8 324
1 ACCEPTED SOLUTION

Steve
Platinum 5
Platinum 5

@Ruxandra wrote:

You also told me to put a sub-table within the main table and wrap the sub-table in <<If>>/<<EndIf>>, but I am not sure I understand how to do that; could you, please, help me using am example?


Steve_0-1726769004702.png

You'll need to tinker with table width of the inner table and cell padding of the outer if you want to eliminate these gaps:

Steve_1-1726769193772.png

And keeping these columns aligned is very difficult because of the magic AppSheet uses to produce the PDF:

Steve_2-1726769263937.png

 

View solution in original post

8 REPLIES 8

Steve
Platinum 5
Platinum 5

Please post a screenshot of the relevant portion of the template.

Hello!

Please, find below the screen shot. Many thanks for your help!

Best regards!

Ruxandra

Ruxandra_3-1726642019026.png

 

 

 

 

It appears you have blocks of the table in your report you want to appear only if certain conditions are met, but you want those blocks entirely hidden otherwise. This is not at all easy to do using a Google Docs template. You could try putting a sub-table within the main table and wrap the sub-table in <<If>>/<<EndIf>>. The problem then becomes spacing and alignment, which itself is a real challenge. Alternatively, you could try using an HTML template rather than Google Docs, but that's also a huge challenge.

In short, I don't see an easy fix for you.

Hello!

I was thinking how about integrating in the second row (the dynamic one) the expression from the first row... I tried something like this, but I had errors in my automation; if I can integrate the fixed text in my start expression which is dynamic, I think, it will be better. What do you think about this? Because the fixed text from row 1 and the dynamic data from row 2 are related (I could say the row 1 is the title and subtitle for the data in row 2).

The idea is: if user select thinks from the first subcategory, then this part should be visible on the pdf, if not, shhould not.

You also told me to put a sub-table within the main table and wrap the sub-table in <<If>>/<<EndIf>>, but I am not sure I understand how to do that; could you, please, help me using am example?

Thank you for your help!

Regards!

 Ruxandra

Steve
Platinum 5
Platinum 5

@Ruxandra wrote:

You also told me to put a sub-table within the main table and wrap the sub-table in <<If>>/<<EndIf>>, but I am not sure I understand how to do that; could you, please, help me using am example?


Steve_0-1726769004702.png

You'll need to tinker with table width of the inner table and cell padding of the outer if you want to eliminate these gaps:

Steve_1-1726769193772.png

And keeping these columns aligned is very difficult because of the magic AppSheet uses to produce the PDF:

Steve_2-1726769263937.png

 

I will try something like this; I think I could use many small tables, every table with its own header. I tried sometime to put table between <<IF:> <<endif>>, but it was with errors.

I also tried hiding the visible lines of the table, but then, there is too much empty space in the table.

Thank you for you answer, I will make some tests.

 Regards!

Ruxandra

Hello, Steve!

It is a solution for what I have to do. Thank you very much for your explanation and example. They help me to understand how I should arrange data on the page. Indeed, it is a work to do, but it is much better like this, than having 100 empty fields. 

In addition, if I make the lines of the inner tables invisible, the framing is no longer visible ๐Ÿ˜,  so the table looks almost perfect ๐Ÿ˜. I tested using a part of my data, I hope it will be ok for all my 100 lines. 

Many thanks!

Regards!

Ruxandra

Steve
Platinum 5
Platinum 5

@Ruxandra wrote:

I tried sometime to put table between <<IF:> <<endif>>, but it was with errors.


We can probably help if you post screenshots of the errors and the relevant template portions.