Can If /Endif Span lines in a template?

Can If /Endif Span lines in a template?

Below does not seem to work? I need to conditionally include a large (repeating) section in a google PDF template.

<<If: [Total Score] > 0 >>

<<[Item]>> - Score: <<[Total Score]>>

More stuff here as well

<>

Solved Solved
0 8 222
1 ACCEPTED SOLUTION

3X_e_1_e16ca5af6c6bb670a5b310148b71203de91d0bfd.png

I would ensure that what is in the red box is a separate table, and the IF and ENDIF are not part of that table.

View solution in original post

8 REPLIES 8

you are missing closing with " < < EndIf > >", most likely that could be a reason.

Iโ€™ve have the EndIf with <<>> in

I think it does not work if spend over multiple paragraphs

Steve
Platinum 4
Platinum 4

Yes

Sometimes it does work but 1 below works, but 2 does not?
(BTW ENDIF does not show up in this editor!)

1 (No paragraph before ENDIF)

<<IF: [Asbestos Status] = โ€œIdentifiedโ€>><<[Asbestos Status]>><>

2 (Paragraph before ENDIF)

<<IF: [Asbestos Status] = โ€œIdentifiedโ€>><<[Asbestos Status]>>
[Another Variable]
<>

Please post a screenshot of the actual template.

see this screenshot example

3X_e_1_e16ca5af6c6bb670a5b310148b71203de91d0bfd.png

I would ensure that what is in the red box is a separate table, and the IF and ENDIF are not part of that table.

I got to the bottom of it. There is a glitch in the AppSheet expression parser.

After the ENDIF there was another IF expression on the next page. Once I put a blank paragraph after the ENDIF it all worked!

After further investigation, it was not just the page break causing the issue. It was just the fact that the an IF followed an ENDIF without a paragraph in between.

This does not work

ENDIF
IF โ€ฆ

This does

ENDIF

IF โ€ฆ

Top Labels in this Space