Compare a value in a repeat (int) with a previous value in the same repeat

913
1
Jump to solution
11-21-2021 01:16 AM
newwollyka
New Contributor III

I have a form with a repeat that capture the information of apartments in a building. One of the information captured is the floor number of the apartment in the repeat.

Since the enumerator should start from the highest floor to the lowest one, I want that when the enumerator entered the floor number in each repeat to compare it to the floor number of the previous repeat since it should be less or equal (but not more).

Is there a way to do that?

 

 

0 Kudos
1 Solution

Accepted Solutions
ZacharySutherby
Esri Regular Contributor

Hello @newwollyka

You can use the indexed-repeat() function to obtain the value of the floor from the previous repeat and use a constraint to ensure the value entered is less than the previous value. 

I've attached a sample XLSForm that shows one way to implement the workflow. Please see this link for more information on formulas in ArcGIS Survey123. 

Thank you,
Zach

View solution in original post

1 Reply
ZacharySutherby
Esri Regular Contributor

Hello @newwollyka

You can use the indexed-repeat() function to obtain the value of the floor from the previous repeat and use a constraint to ensure the value entered is less than the previous value. 

I've attached a sample XLSForm that shows one way to implement the workflow. Please see this link for more information on formulas in ArcGIS Survey123. 

Thank you,
Zach