How to use conditions in Templates.

Posted by Sudhakar on 03-Sep-2014 11:46

Hi all,

1.user will click button button as shown in below


2.Then it will open the PDF like below


But i want to hide the city value if "alert=true" in the PDF (Alert is Field marked in red in 1 SS).
How can i use if condition to hide the field in HTML template which is generating the PDF.

All Replies

Posted by pvorobie on 03-Sep-2014 11:51

Please use #EVAL[   ] block. Inside that block place JavaScript expression which will be calculated on server side and substituted into your template.

Posted by Sudhakar on 03-Sep-2014 11:59

thanks [mention:05b5f00eae4a468d844fa8bedcafd110:e9ed411860ed4f2ba0265705b8793d05] ,

i am not aware of how to use it,can you pls give one example.

Posted by pvorobie on 03-Sep-2014 12:11

Assuming you have boolean field {!alert} in your record, try this:

#EVAL[ {!alert} ? "<span color='red'>" : "" ] some text #EVAL[ {!alert} ? "</span>" : "" ]

Posted by Sudhakar on 03-Sep-2014 12:35

thanks,working fine

This thread is closed