How to check if a field is filled before displaying it in a template?
Posted by Vitaliy Hutyk (AIT) on 13 March 2017 11:38 AM

Certain fields in Invoices, Paymets, etc. are often left empty, but are useful to display if they are not.

To make a template check if a field has a value before displaying it, you can use the following expressions (replace FIELD_VAR_NAME with the variable name of the field in question):

 

1. For fields with numerical values:

\If (FIELD_VAR_NAME<>0)\

\FIELD_VAR_NAME\

\endif\

 

2. For fields with text values:

\If (FIELD_VAR_NAME<>'')\

\FIELD_VAR_NAME\

\endif\

(0 vote(s))
Helpful
Not helpful

Comments (0)
© AIT Translation Management Solutions, . Awesome Software Tools for Translators and Translation Agencies.
Privacy Policy | Data Processing Agreement