Knowledgebase: Projetex
How to check if a field is filled before displaying it in a template?
Posted by Vitaliy Gutyk (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, use the following expressions:

 

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)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).