# Using values from previous repeat

I am new to ODK and have a basic working form (see attached XML)

I have a linear trench from which samples are collected, with From and To values. The geologists want to have a constraint which will prevent entering a From value LESS than the To value from the previous repeat.

E.g. First repeat instance

kobo_trench_logging_v2_bruce.xml (9.11 KB)

··· From: 0m To: 1.2m

Second repeat

From: can only be greater or equal to 1.2m
To: 2.4m

Third repeat

From: can only be greater or equal to 2.4m

All help will be appreciated.

Thanks
Patrick

Dear all

I have a similar question. But want to ask about how to program this using the excel format. Any example, referral to website or manual pdf would be great help.

Best regards

Jozef

··· On Thursday, May 7, 2015 at 6:54:48 PM UTC+2, haza...@gmail.com wrote: > I am new to ODK and have a basic working form (see attached XML) > > I have a linear trench from which samples are collected, with From and To values. The geologists want to have a constraint which will prevent entering a From value LESS than the To value from the previous repeat. > > E.g. First repeat instance > > From: 0m > To: 1.2m > > Second repeat > > From: can only be greater or equal to 1.2m > To: 2.4m > > Third repeat > > From: can only be greater or equal to 2.4m > > All help will be appreciated. > > Thanks > Patrick

I am new to ODK and have a basic working form (see attached XML)

I have a linear trench from which samples are collected, with From and To values. The geologists want to have a constraint which will prevent entering a From value LESS than the To value from the previous repeat.

E.g. First repeat instance

Second repeat

Third repeat

All help will be appreciated.

Thanks
Patrick

Can anyone assist? Have looked through the indexed-repeat info, but don't understand how to reference the previous repeat.

Thanks
Patrick

··· On Thursday, May 7, 2015 at 6:54:48 PM UTC+2, haza...@gmail.com wrote: > From: 0m > To: 1.2m > From: can only be greater or equal to 1.2m > To: 2.4m > From: can only be greater or equal to 2.4m

Search for "position(" on the list.

I have never tried to do this type of constraint, so I don't know if it is
possible, but it would involve that function.

If you are able to construct a form with this logic, please reply and
supply the XLSX file on this thread, as it would be a valuable contribution
for others.

Mitch

··· On Wed, May 27, 2015 at 6:23 AM, wrote:

On Thursday, May 7, 2015 at 6:54:48 PM UTC+2, haza...@gmail.com wrote:

I am new to ODK and have a basic working form (see attached XML)

I have a linear trench from which samples are collected, with From and
To values. The geologists want to have a constraint which will prevent
entering a From value LESS than the To value from the previous repeat.

E.g. First repeat instance

From: 0m
To: 1.2m

Second repeat

From: can only be greater or equal to 1.2m
To: 2.4m

Third repeat

From: can only be greater or equal to 2.4m

All help will be appreciated.

Thanks
Patrick

Can anyone assist? Have looked through the indexed-repeat info, but don't
understand how to reference the previous repeat.

Thanks
Patrick

## --

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