Index of Min Value in Repeating Group. Possible?

Hi All,

I captured information in a begin group like this

name age
Alex 49
Daniel 7
Sofia 9
Dora 44

I need to know what is the name of the youngest person.

After repeat group I use min(${age}) to get minimum 7.

I wonder if is possible to get the possition of that minimum easily.

What I did was going through all data and compare with minimum using an If(indexed-repeat(${repeatinggroup},${repeatingquestion},index1 = Minimum, IndexFound, ....indexed-repeat(${repeatinggroup},${repeatingquestion},indexN = Minimum, IndexFound,).

Maybe there is a more efficient way to do that.

Thanks for your time

Alexander Torrado

Alexander,

I think the way you are doing it is as good as it gets.

Yaw

ยทยทยท On Mon, Mar 20, 2017 at 8:36 AM, wrote: > Hi All, > > I captured information in a begin group like this > > name age > Alex 49 > Daniel 7 > Sofia 9 > Dora 44 > > I need to know what is the name of the youngest person. > > After repeat group I use min(${age}) to get minimum 7. > > I wonder if is possible to get the possition of that minimum easily. > > What I did was going through all data and compare with minimum using an If(indexed-repeat(${repeatinggroup},${repeatingquestion},index1 = Minimum, IndexFound, ....indexed-repeat(${repeatinggroup},${repeatingquestion},indexN = Minimum, IndexFound,). > > Maybe there is a more efficient way to do that. > > Thanks for your time > > Alexander Torrado > > -- > -- > 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.