Features appended to a Survey123 feature layer "break" the form in Survey123 app

653
4
07-19-2021 01:13 PM
Galen_S_MnDOT
Occasional Contributor

Hello all!

 

I have a structural inspection form I've been designing in Survey123 Connect that uses lots of conditional logic (i.e. the 'Relevant' column the XLS Form) as well as numerous auto-calculated ratings.  The 'Relevant' conditions and calculations all seem to work as-designed in the Suvey123 Connect environment, and they likewise seem to work just fine for completely new records created and submitted using the Windows, Android, and iOS versions of the Survey123 standalone app.

HOWEVER, this particular inspection form is meant to be used almost exclusively with existing structures, and so I'm attempting to append our existing inventory data to the form's AGOL-hosted feature layer.  When put into actual use, inspectors will be opening and filling out (or completing) records for existing structures in the Survey123 rather than starting completely  new entries.

Unfortunately, after adding a subset of data to the form's feature layer for testing, I've noticed the following errors, albeit only for those appended records:

  1. Most (but not all) of the 'take/upload' photo questions appear as empty blank grey ovals
  2. Some of the auto-calculated fields don't seem to be properly triggering; fields that are properly calculated with defaults in a completely blank entry are left blank when an appended record is opened.
  3. Required fields that are only supposed to trigger with certain conditions are still throwing 'required field is still blank' errors even if the relevance conditions aren't met.

 

Disclaimers:

  • This implementation is actually the second version of this inspection form; the first also used appended inventory data but didn't have a problem with form calculations not functioning.  However Version 1 did have far fewer calculations and conditional formulae.  This was mainly because we had to use a combination of Collector and the Survey123 web form, since the standalone Survey123 app wasn't available on our staff's agency-issued devices at the time (it is now).
  • I've already tried appending the inventory records to the form's AGOL feature layer two different ways: first using the 'append' tool in ArcGIS pro, and then (after starting over) by using the AGOL append function by uploading a zipped GDB.  Behavior of the appended data was the same in each case.

Many many thanks to anyone who can point me in the right direction toward addressing these issues surrounding our appended data in Survey123! 

4 Replies
DougBrowning
MVP Esteemed Contributor

Check out these two posts.  I have the same issue with drafts - calcs and defaults do not fire until something changes.  What I do is load existing features in Field Maps\Collector and pass the id  and other info over to the form.  Then I use relationships classes to hold it all together.  I personally do not like letting the inspector edit everything.

https://community.esri.com/t5/arcgis-survey123-questions/default-values-for-inbox-surveys/m-p/861920

and

https://community.esri.com/t5/arcgis-survey123-questions/using-calculations-to-prepopulate-answers-w... 

Hope that helps

Galen_S_MnDOT
Occasional Contributor

Thanks so much for those references @DougBrowning !  MVP badge clearly deserved 🙂 

Changing the various rating (and other auto-calculated) fields from visible field types to 'calculate' fields types per the second post you linked has completely solved issue #2 from my original post, and adding more precision to the 'required' column (in most cases simply duplicating the 'relevant' formula for the attribute in question) solved issue #3. 

I don't think I knew adding conditional formulae  to the 'required' column was even possible until read it in one of the threads you linked!

The only thing left to figure out is why photo questions show up as empty grey ovals (issue #1)... that is, only until the user toggles the relevant yes/no question back and forth once or twice.  It definitely is still somehow connected to the characteristics of the appended data since this issue is completely non-existent in completely fresh/blank records.  Examples attached in sequence:

toggle 01.jpg       toggle 02.jpg      toggle 03.jpg

It seems like it's not a "can't attach photos to existing records" error I've encountered previously in Survey123, since photos added after the 'camera/browse for files' buttons correctly appear are properly saved to each question. 

DougBrowning
MVP Esteemed Contributor

Hmm I have seen grey boxes but not for photos.  What is your relevant formula for it?

Calculate fields do help a lot.  Glad it helped.

0 Kudos
Galen_S_MnDOT
Occasional Contributor

Rats and double rats... without any subsequent updates, the issue with final calculations not triggering properly seems to have returned.  Can't seem to explain it; immediately after publishing the changes that switched the various related fields' types to Calculates everything worked properly, but now the output fields are back to showing up as blank.

As for the greyed-out image buttons, the relevance formula is a simple single-argument selected() statement:

selected(${f1_concreteCrack_bool},'yes')

I was wondering if the issue in this case has something to do with the fact that this question is nested within a group that is itself governed by a Relevant formula, but then I remembered this all works fine for records created within Survey123; it's only the existing structure location records that have any of the above-described problems 😕

0 Kudos