I want to use an ifi to hide a part of our letter if no data is in the fori. The fori works fine, but when I export the letter to pdf, the part with the data I input is never visible.
How do I have to implement the ifi to work with the fori in the table?
{% ifi VAA.Soort != blank %}
Volgende voordelen betreffende het privégebruik van bepaalde bedrijfsgoederen of –kosten werden reeds aangeven aan de fiscus:
So in general the use of the ifi-statement is the correct way to approach this. The only issue is the content of the ifi-statement. Currently you are trying to check if a variable with namespace VAA and key Soort is blank. However, this variable does not exist. What does exist is company.custom.voordeel.voordel_1.Soort as part of the fori-loop.
So in order to check if data is included in the column VAA.Soort you should access the fori-loop separately at the top of your code and check if there is data in the column VAA.Soort for any of the rows.
To achieve this, you could add something like this:
{% assign show_table = false %}
{% for VAA in company.custom.voordeel %}
{% if VAA.Soort != blank %}{% assign show_table = true %}{% endif %}
{% endfor %}
And check this show_table variable in the ifi-statement.
{% ifi show_table != blank %}
If you only want to hide the table when the fori is completely empty (so not only checking the first column) you could also easily do
{% ifi company.custom.voordeel != empty %}
One final remark, is there a specific reason you would link this fori-loop to the company drop? By doing so, the input fields will not be period specific. Meaning if you add or remove one line in one period, it will also be added or removed in other periods.