Values from repeat section being lost randomly (Since Dec 2022)

1182
8
Jump to solution
01-06-2023 07:34 AM
ConnorPatrickDennehy
New Contributor II

Description of the survey:

  • Prompts the user to collect various information regarding the conditions at snow survey sites.
  • A main feature of the form is a repeat section in which snow depths are entered for a sequence of 10 sampling locations.

Description of the problem:

  • Once a survey is sent and received by ArcGIS Online, sample depth values will often be lost, seemingly at random. The field for these values is required in the form.
  • Sometimes all ten snow depths are retained, and in some cases only one of the ten is (typically it's the tenth value in that case).
  • I have also submitted numerous test entries since discovering the issue and found that if I copy sent data to a new survey and send it again, different values will be missing (eg, the first time it was samples 1 ,2, 4, and 5 and the second time it’s just samples 2, 4, and 5). 
  • This issue seems to have first occurred in mid December 2022 - leading me to suspect that it may be a glitch resulting from the update on December 6th

 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
ConnorPatrickDennehy
New Contributor II

Update: Esri support was able to identify the issue. 

BUG-000152027: When adding a value in a repeat question without clicking the Done or Checkmark icon button on an iOS or Android device, the ArcGIS Survey123 field app does not return the calculated data.

Workaround for now is: 

  1. Submit the survey using a web browser.
  2. Always select the Done or Checkmark icon on the keyboard on the mobile device before selecting the '+' plus icon to record another data point.

View solution in original post

8 Replies
DougBrowning
MVP Esteemed Contributor

I would bet it is repeat count.  It has burned me so many times on this.  Esp drafts and copy.  It is something with the way it loads repeats when there is a repeat count.  It does all at once vs growing.  Most of these issues are when there is a formula in repeat count - which you have, your formula is almost identical to the one that got me really.  I think something happens like it evaluates repeat count before snow_present so it briefly goes back to 1 then evals to 10 and adds the repeats back or vise versa.

Few things to try.  Have a field that calcs repeat count and set it to once() or maybe the new calculation mode set to manual.  Basically try to get the repeat count to not recalc all the time.  This can be tricky.

Other option, which is what I do now, is to take out repeat count totally.  Then instead just count up yourself and then set a constraint on that number.  You will have the case where the user can add past 10 and get to 11 but they can't save.  I added a red warning note like Opps went to far delete this record.  Not perfect but it has been way, way more solid.  I have a write up posted somewhere on this if you need more to gone on.

In the end I took repeat count out anywhere it would be a formula.  Just not stable.  Spent many hours on it and with the 123 team and this was the best choice.

Hope that helps

0 Kudos
ConnorPatrickDennehy
New Contributor II

Hi Doug,

Thank you for taking the time to share your knowledge on the matter. Unfortunately, even after removing my repeat_count clause entirely, the disappearance of repeat section values still persists.

0 Kudos
DougBrowning
MVP Esteemed Contributor

And you tried a test from the beginning and not opening up old ones? 

Do you have this setting on the begin repeat line?

query allowUpdates=true  in the column bind::esri:parameters

0 Kudos
ConnorPatrickDennehy
New Contributor II

Yes, I was testing with new surveys. I didn't have that setting but I've added it now and it has not fixed the issue.

0 Kudos
DougBrowning
MVP Esteemed Contributor

I see you have bind null on the begin repeat line.  Not sure what that will do really but for sure remove it

DougBrowning_0-1673292143822.png

I see you also have bind bull on a repeat_entry field and then use that in a calc.  I could see that be an issue since that value will not be there is you reopen it possibly.  Same with sample_depth_in.  I have done this and been ok but may be worth a test.  Oh and survey_id also is null and then you have a relevant based on that later.

Just a guess.

 

0 Kudos
ConnorPatrickDennehy
New Contributor II

Thanks again. What's really curious about this is that the form had been working exactly as intended for several years. Nevertheless, I even went as far as to re-install Survey123Connect with the latest version and then rebuild this survey from scratch, this time taking out those nulls as you suggested. The result? Now the related records are not even showing at all. It's just blank. So maybe I have to ditch the repeat section altogether.

Snow Survey Error.jpg

0 Kudos
DougBrowning
MVP Esteemed Contributor

Mmm it says 10 there at the top.  Maybe it is security issues?

123 did make some major calculation engine changes last year about this time and we had a number of forms break.

I use repeats all the time without issue.  Something else is going on here.  Is the app on the device up to date as well?

May be time to bring in support on this one if the 123 team is not around.  Sorry not sure what else to try now.

0 Kudos
ConnorPatrickDennehy
New Contributor II

Update: Esri support was able to identify the issue. 

BUG-000152027: When adding a value in a repeat question without clicking the Done or Checkmark icon button on an iOS or Android device, the ArcGIS Survey123 field app does not return the calculated data.

Workaround for now is: 

  1. Submit the survey using a web browser.
  2. Always select the Done or Checkmark icon on the keyboard on the mobile device before selecting the '+' plus icon to record another data point.