Hello Ian,
thanks for testing. Very helpful.
I've moved these 3 together {{/with}}{{/pf:if}}{{/each}}. If I open the csv with exel, it looks perfect.
But, if I open it with note pad I see (as per your example):
COLUMN1,COLUMN2,COLUMN3,,
1,1,1,,
2,2,2
Which means, it adds the "blank line" after the previous one, instead of bellow.
I'll test if this is good enough when importing the content to another system.
About the missing }, it was me copying it in this post.
Again, many thanks.
------------------------------
Alicia Rico
CI
Johnson Controls
------------------------------
Original Message:
Sent: 09-06-2024 09:15
From: Ian Chamberlain
Subject: CSV Template with Repeatable Section
Hello Alicia,
I just used your example and I am not seeing the blank line that you are seeing. I did tweak the template a little bit to the following (replaced the ; to a , and put your 3 value references on the same line.
COLUMN1,COLUMN2,COLUMN3{{#each dataRecord.pages.P.sections.S.rows}}{{#pf:if pages.SP.sections.SS.answers.Q1.values.[0] ">" "0"}}{{#with pages.SP.sections.SS.answers}}{{Q1.values.[0]}},{{Q2.values.[0]}},{{Q3.values.[0]}}{{/with}}{{/pf:if}}{{/each}}
My Form submission looks like this and the final CSV output, we would expect to see only 2 rows.

My final CSV looks like:
COLUMN1,COLUMN2,COLUMN3
1,1,1
2,2,2
Something else that I noticed in the template that you pasted above is a missing } on this line: {{#with pages.SP.sections.SS.answers}. It produced an error for me until I corrected the missing }.
Let me know if this was helpful or if you are still seeing that blank line.
------------------------------
Ian Chamberlain
Solutions Architect
TrueContext
------------------------------