Select to view content in your preferred language

Survey123 Survey Crashing on iPad (related to calculate field that counts a repeat)

453
2
05-16-2024 02:40 PM
JonCardiello
New Contributor II

My team recently encountered a bug in our Survey123 Survey that I wanted to share here to see if anyone else has experienced similar issues, and to possibly report the bug to the software team.  

Details of workflow:

The buggy behavior on iPad that we have been experiencing is that in one of our surveys in the Survey123 field app keeps crashing after 5-10 photos have been taken, losing all data.  It also has a slow processing behavior where it won't render the first tap on the screen but then processes it after the second tap.  This lag creates a difficult UI for entering data and results in data errors. 

I was able to narrow in on the lines in my xls form that were causing the issue and get our survey back on track. I realized that it was just the presence of a calculation field within a repeat that is counting the number of repeats.  When moved to outside of the repeat itself, the issue goes away. 

After more troubleshooting though I am realizing that it is slightly less simple than I thought. After testing it more, it seems as though when the survey only has one or two repeats, the bug isn't present even if the calc field is within the repeat.  I created some generic forms to demonstrate the issue.  Here is the breakdown of the files I am attaching:

  • V1.0 only has 1 repeat with the repeat count field within the repeat (no bug present)
  • V1.5 has 3 repeats with the repeat count field within the repeat (bug present)
  • V2.0 has 3 repeats but with repeat count field moved outside of repeat (no bug present)

I am hoping that maybe this can help someone else who might be trying to do a similar thing in a survey.  Also maybe by logging this it can get flagged as a bug to maybe bring up a syntax error without letting the user publish a survey that will result in data loss when used in the field.

System Details:

Publishing a survey from desktop Survey123 Connect on PC Windows 10 (version 3.19.116)
Running into bug on iPad iPadOS (17.4.1) on Survey123 Field App (v2.19.121)

 

Tags (1)
0 Kudos
2 Replies
DougBrowning
MVP Esteemed Contributor

Are you trying to run a counter to use in a photo name or something like that?  If so I use once(count()) so that it just fires once and does not mess things up if they go back in the repeat.  I see you do not have once and are setting calculate to always.  I could see this creating a loop inside the repeat.  I also not sure what the use case would be to need this.  I sum up nested repeats a lot and have been ok.  I have been having this issue with position though.  If you let the form run in Connect are you seeing the little warning mark show up at the top right (you have to leave the form run for a few mins to see it and I have to say it was news to me as I tend to go through the form fast.).  Have you made a log file yet?  Try one and you will probably see it is huge just running and running.

Not sure your use case or I could give you a better workaround as I have been battling this back and forth for years now.  I am heading out the door for a few weeks so sorry I cannot answer but others may, so post the use case.  It may get fixed but probably not so looking for ways around it is the way to go.

Hope that helps

0 Kudos
abureaux
MVP Regular Contributor

I've encountered this a lot. It's a bug and Esri is aware of it... will try to dig up the code if you want to link to your account.

EDIT: found it quicker than I was expecting. BUG-000162468 In the ArcGIS Survey123 field app (version 3.18.145), iOS devices do not display the next page after clicking the next page ‘>’ icon.

EDIT2: In case it wasn't clear, that text is from Esri's brief description of the issue. This bug persists in 3.19, and it may have been present in versions prior to 3.18.

The only real solution is to pull items out of the survey until the issue goes away. Then, you can work at adding content back in and try to work around the bug.

This is a very dangerous bug since it crashes without saving anything... really hope Esri repairs this one soon.