Showing results for 
Show  only  | Search instead for 
Did you mean: 

Loop count for af:repeat

Changemaker II

Hi all, I wonder if any of you have come to a definitive conclusion about the following that I've deployed within a process.

The process generates a PDF report, based on the elements and comments that have been selected. Within each section, there is a separate, repeatable subform into which additional free form comments can be entered, meaning that there are between zero and 'n' additional comments to tack on to the end of that section of the report.

When generating the PDF, I use the af:repeat construct to loop around all of the submitted additional comments, expecting it to loop the same number of times are there are comments.

It would appear however that this always passes around the loop once, regardless of whether or not there is a comment to display.

My question therefore is, in the case where the repeatable subform has not been populated at all, does the af:repeat construct loop around it zero times or once?

If it always loops once in the case of an undefined, i,e, unpopulated subform, then I have an idea of how to count up the number of lines submitted. I just wondered whether anybody else has come across this.