Select to view content in your preferred language

Count number of repeats

3206
4
09-19-2017 07:17 AM
RenatoSalvaleon
Frequent Contributor

I wanted to know the number of repeats in my repeat section and store it as an integer. Questions in my repeat section are multi-select questions so I'm using count-selected and I cannot use them to count the number of repeats. So on the picture below, I want to capture the number 3 or whatever the max number of the repeat.

Tags (2)
0 Kudos
4 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Renato,

I believe the count() function will address this - have it count a field in the repeat.

0 Kudos
RenatoSalvaleon
Frequent Contributor

After I read the thread on AutoIncrement integer that's how I ended up with this question. A hidden, null field with a default value of 1. Not ideal but it works.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

The count() function will work with any field- you don't need a special one for summation.

0 Kudos
RHammers
Occasional Contributor

I realize this is a very old topic, but I have a question...

On a feature report, it possible to reference that number within the repeat itself (edit: meaning between the start and end tags)? I want to show 1 of 3, 2 of 3, 3 of 3 in my report, but when I try to reference the number, it displays 1 rather than 3.

I've tried counting one of the fields within the repeat using a line from outside the repeat, which does correctly store the number of repeats, but when I try to reference it in my feature report from within the repeat, the value again returns as 1.

0 Kudos