Feature Report > Nested Repeat > getValue only counts 1

273
2
12-07-2022 02:43 PM
NicholasDay
New Contributor III

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:

NicholasDay_0-1670451485250.png

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." 

NicholasDay_1-1670451739563.png

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.

 

0 Kudos
2 Replies
johnbel
New Contributor

Solution please. How to enumerate "item of total items" in repeat.

0 Kudos
johnbel
New Contributor

Solution please. How to enumerate "item of total items" in repeat.

0 Kudos