Survey123: end survey or gray fields once specific count is reached

262
1
01-02-2019 11:11 AM
Highlighted
New Contributor

Hello!

I have created a pebble counter for stream analysis in Survey123. There are 20 different pebble size spinners (e.g., silt, clay, sand, etc.) and a total count field that sums the pebbles collected across the size classes. Once the total count field sums to 100, I would like the spinners to gray out or stop accepting inputs so that the number of pebbles collected does not exceed 100 and the survey collector knows they are finished. I tried to use the relevant field by setting the pebble size counters to ${total_count}<=100 (meaning, when the total count is less than or equal to 100, remain visible, but when the count exceeds 100, disappear). However, I get the below error message:

"ODK Validate Errors: Something broke the parser. See above for hint. Dependency cycles amongst the xpath expressions in relevant/calculate. Result: Invalid."

Is there a way to have the survey end when it reaches a number of records collected or for fields to stop accepting input? Thanks!

Attached is an excel doc that shows how the XLSForm is set up.

Reply
0 Kudos
1 Reply
Highlighted
Esri Esteemed Contributor

Hi Amy,

You are encountering a limitation of the form processor used by Survey123 - it prevents cyclical calculations (calculations that involve the value being calculated).  This is done because it can be easy to construct calculations that always increment or continuously change.  Just to note, you would want these calculations to eb set on the read_only column, not the relevant column (though it is subject to the same calculation limitation).

Reply
0 Kudos