I have an odd issue. I have a set of repeating questions (species and count). I calculate a string as "count - species", which I then join to create a list of all entries for users to see. I also created an Index within the repeat (repIndex) using position(..), which I then use to pull the "count-species" for the last 5 entries using indexed-repeat (${count-species}, maxIndex), indexed-repeat(${count-species}, maxIndex-1) and so on. maxIndex is calculated outside of the repeat as max(${RepIndex}).
This works fine until I hit 10 entries. At this time, the method of taking the maxIndex fails and will not go past 9; this max is displayed as Max Repeat Index. The repIndex variable (displayed as Repeat Index) is still working fine. taking the max of the counts works fine (Max Count), but taking the max of the repIndex fails after I pass 9 entries. Any insight?
I've attached a screenshot of the survey and the xlsForm
Any insight as to why max() falls apart for the index