php – How to correctly make conditions in TinyButStrong?-ThrowExceptions

Exception or error:

I have to make a template in the TinyButStrong language, but I have no access to the PHP side. I’m just able to modify my template and to upload it on my ERP.

Anyway, the PHP side is working well.

I tried to put an if statement in my ODT template file, but when rendering it doesn’t work.

My condition:

[if [tab.product_type]!=1; then ‘[tab.product_ref]’; else ‘0’; block=table:table-row]

I verified value of tab.product_type, and the value is 0 or 1.

I tried many syntaxes, but none is working well. The only thing that it shows is:

Rendered PDF.

Where did I make a mistake? I really don’t understand, because I tried many syntaxes and I still get this line.

How to solve:

Little update :

I saw that the “when” is more adapted to this usage.
I found a syntax but I’m still having bad results. I made this :

[tab.product_ref;block=table:table-row;when [tab.product_type]!=1]

Anyway, it’s giving me lines where tab.product_type is 1.
Why ?? I really don’t understand how this language works…

Leave a Reply

Your email address will not be published. Required fields are marked *