avoid empty lines in templates if value is blank

Hi all,

I have a template to create a PDF document, which contains:

<<If: ISNOTBLANK([Textblock 1])>><<[Textblock 1]>><<EndIf>>
<<If: ISNOTBLANK([Textblock 2])>><<[Textblock 2]>><<EndIf>>
<<If: ISNOTBLANK([Textblock 3])>><<[Textblock 3]>><<EndIf>>

If e.g. "[Textblock 1]" is blank an empty line exists, but if "[Textblock 1]" is not blank it should be in a new line.

How can I avoid the empty line?

I tried:

<<If: ISNOTBLANK([Textblock 1])>>
<<[Textblock 1]>><<EndIf>><<If: ISNOTBLANK([Textblock 2])>>
<<[Textblock 2]>><<EndIf>><<If: ISNOTBLANK([Textblock 3])>>
<<[Textblock 3]>><<EndIf>>

But this throws an error: 'If: ISNOTBLANK([Textblock 2])' is invalid due to: Unable to find function 'IF: ISNOTBLANK', did you mean 'ISNOTBLANK'?

I tried:

<<If: ISNOTBLANK([Textblock 1])>><<
[Textblock 1]>><<EndIf>><<If: ISNOTBLANK([Textblock 2])>><<
[Textblock 2]>><<EndIf>><<If: ISNOTBLANK([Textblock 3])>><<
[Textblock 3]>><<EndIf>>

But this throws also an error: Contains start token '<<' without matching end token '>>'

Thanks, Joachim

 

0 7 655
7 REPLIES 7
Top Labels in this Space