I was trying to insert a true/false datafield within a signature table, my intention was to display different cells depending on whether the parties were legal or natural persons. However, I cannot make my condition work within table pipes (||), the only way I managed to achieve a similar aesthetic result was by using %% instead. Therefore, my question is: Is it possible to insert conditions within tables that allow you to show or hide columns or rows? If so, what is the right approach to it (ex: should I insert the curly brackets inside the pipes)? Could you exemplify?
Hi Marina,
It is indeed possible to insert conditions within tables.
You can make certain content inside the cells conditional just by writing the condition inside the cells. That works the way conditions normally work.
You can also create conditional rows and/or conditional columns. To make a row conditional, you simply add the condition right after the last double pipes of the desired row. Let’s take your case for an example:
Assuming that I want the second row of my signature table to contain some tailored information depending on whether ‘Party 1’ is a legal or a natural person, I could create a table like this:
|| Party 1 || Alpha Ltd, Represented by … || %signature% Signature:|| {#party1^legal-person = true}
|| Party 1 || Full name || %signature% Signature:|| {#party1^legal-person = false}
In doing so, the table will only show the appropriate row, with the adequate fields, depending on whether Party 1 is a legal or a natural person.
You can also check our tutorial video on Advanced Tables to see the similar process on how to create a conditional column instead.
Thank you, Senne. That was helpful!