Thanks for the enhancement request. There ar a couple of different ways this has been proposed before -
1) having an auto-incrementing number in the repeat
2) The XLSForm spec has a function called position() that might accomplish what you're describing
I've added this post to the enhancement issues of these two features.
Just FYI it does note that the position() function does not work....Open Data Kit » Binding , which I believe implies that the function must be called on some XPath expression? Such as '..', ie position(..)
"Return the XML position() value of this node in a filtered XPath expression. Note that position() does NOT work."
At them moment I am still trying to find a workaround, and will post if anything pans out. Please let me know if you have any other suggestions.
Have you heard of any success using the position() function in an XLSform w/survey123 ?
James I do appreciate your assistance through this, however I do still have some unanswered questions that may determine if I am able to use Survey123 at this time:
Is there any known method to reference the index of the repeat group/ repeat group counter at this time? It seems that none of the position(..) operators that I called were able to execute in Survey123 even though my work in other ODK collect/XLSform converters.
"ReferenceError: position is not defined in expression: position(..)"
The end goal I am trying to accomplish would be to dynamically reference external data within a repeat group of a varying number of iterations. Such that the form could be pre-populated with existing data.
How about join() and/or aindexed-repeat() functions to access data inside the repeat group.... It seems to me that these functions are not yet supported in Survey123.
Is there a formal way to propose an enhancement?
Thanks in advance,
Both join and indexed-repeat are in the list of functions we plan to implement for XLSForm compatibility. Aside from requesting it here, we use the ideas.arcgis.com section of GeoNet to track user requests; enhancement requests can also arise out of technical support incidents.
Hi James Tedrick,
Did the indexed-repeat functionality ever make it in? I'm assuming no because I'm trying to use it and I'm getting an error (unless I'm doing something wrong).
If not, any new developments on how to systematically pull out the data captured in repeats and reference the values elsewhere in the form?
Thank you for your help!
(and help with literally everything else I've done in S123!)