Is it possible to count the number of iterations for a repeat when the expression is placed between the repeat start and end tags?
Conditions:
In my survey, I have a nested repeat for "lines" within a "transect."
In my feature report, I would like to have a header which states the 'line number' of 'number of lines.' For example:
In the feature report, the expression ${if (transect_rp | getValue:"count")>1} works properly when not within any repeat start and end tags. Once placed between the tags (see screenshot below), the count always returns "1" so that I end up with headers like "Line Number: 2 of 1."
It makes sense that "1" is returned when running the count within the repeat being counted. To alleviate this, I tried using the $layers expression to change the parsing scope, but it did not make any difference. Is it possible to count the number of iterations for a repeat when the expression is placed between the repeat start and end tags? The alternative is to include the calculation in S123.
Solved! Go to Solution.
I was able to get it to work by doing the following:
${#transect_rp}Line Number: ${line_nu} of ${$layers[0].count_transect_rp}
Solution please. How to enumerate "item of total items" in repeat.
Solution please. How to enumerate "item of total items" in repeat.
Was there ever a solution for this? I have the same issue.
I was able to get it to work by doing the following:
${#transect_rp}Line Number: ${line_nu} of ${$layers[0].count_transect_rp}