Hi,
Im a beginner with ODK so bare with me.
I want to associate every repeat in my repeat group with a number that is essentially "Parent_index.Repeat_index".
trying to include these numbers as part of a unique ID of each chart.
Any idea how to generate this? I was trying to mess with position(), or count(), but those kept coming up as zero. wasnt sure what to put in the parentheses. Tried to mess around with indexed-repeat as well but had no idea what i was doing.
Thanks,
Arram
The position (or count) of an element within a repeat group would be position(.) - notice the dot.
In general, the dot means "this variable". For example as in the the "constraint" column, . >= 5 means "this variable must be greater or equal to 5"
Francis,
You are correct about the dot meaning this variable, but if you are
inside a repeat, you'll need position(..) not position(.)
I try to also generate UUIDs for my repeats because positions can
change if you add/delete repeat instances. To do that, I have a
calculate field with a calculation of 'once(uuid())'
You can see an example of the above at
https://groups.google.com/d/msg/opendatakit/M_pERTptaA4/ltWOFzpWCQAJ.
Yaw
ยทยทยท
On Thu, May 25, 2017 at 6:35 AM, wrote:
> The position (or count) of an element within a repeat group would be position(.) - notice the dot.
>
> In general, the dot means "this variable". For example as in the the "constraint" column, . >= 5 means "this variable must be greater or equal to 5"
>
> --
> --
> Post: opendatakit@googlegroups.com
> Unsubscribe: opendatakit+unsubscribe@googlegroups.com
> Options: http://groups.google.com/group/opendatakit?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups "ODK Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.