Syncing Survey123 data to a versioned environment

243
3
Jump to solution
02-26-2020 12:50 PM
TylerSmith4
New Contributor III

Background Info: Moving hydrant inspection relationship from FacilityID to FacilityID (hyd feature class to hyd inspection tbl) to anew GLOBALID to Rel_GUID relationship.

After doing some searching, it appears that in order for Survey123 to support an auto-generated ID (i.e. GUIDS) the feature service the survey is being published from cannot be versioned, in order to have applyeditswithGlobalIDs set to True. 

This means I would have to unregister as versioned the following: 

Hydrants, Hydrant Inspection table, Manholes, Manhole inspection table, meter assemblies/meter inspection tables.

Or, I could copy the data on SDE, unregister it, and maintain copies of datasets (want to avoid this if I can). Having the surveys as hosted feature services would present its own problems because then I'd have to manage two different related tables with different relationships. 

Bottom line is we want our field guys to have an autopopulating ID whenever they create a new feature, and have the relate based on that. This may be possible with an arcade expression, I am not sure. Any help is appreciated!

1 Solution

Accepted Solutions
DougBrowning
MVP Frequent Contributor

Best we could do is have a crew number as part of the ID.  We have a 5 digit number with the first 2 as the crew number and the next 3 as the code the crew can increment.  Does not have to be sequential across the DB just unique.  If we have 10 crews all offline then sequential is impossible.

Hope that helps.

View solution in original post

0 Kudos
3 Replies
DougBrowning
MVP Frequent Contributor

If you already have points for these assets then you could have the existing FC in Collector.  Launch the 123 form from the popup and pass the asset id over to 123.  Then have a relationship class between them.  I prefer to not use globalid since you can't edit them, they can not be recreated like a pattern can, and it all breaks on export or a database move.

See my post here for more https://community.esri.com/thread/221263-mapping-with-survey123-within-a-polygon-or-admin-unit 

Hope that helps.

0 Kudos
TylerSmith4
New Contributor III

Doug,

Thanks for the response. This would work fine, but the only problem is if say a field guy goes out to a job site where a brand new Backflow is being installed, or a hydrant, etc.. they collect a point in Collector and they'd either have to manually input an ID as a placeholder, or leave it null. As a result, it would be a lot harder to discern which hydrant the survey form was filled out for, unless we had an auto-populating ID.

Our existing workflow is this: 

CollectorFC sitting in a versioned environment based on a Field_Edits version

Inspection table sitting in an EGDB with a relationship based on facilityID. Our ID scheme is something like wFH and then a sequential number. I can set up a python script that calculates new ID's, but this won't happen in real time. 

The hosted FS gets downloaded into a staging GDB (not on SDE) and a script gets ran to add new records to the inspection table. I just see this being a problem if the crew puts in the wrong sequential ID, or if the sequence breaks. I thought basing the related table on a GUID would make this easier to manage, but perhaps not.

0 Kudos
DougBrowning
MVP Frequent Contributor

Best we could do is have a crew number as part of the ID.  We have a 5 digit number with the first 2 as the crew number and the next 3 as the code the crew can increment.  Does not have to be sequential across the DB just unique.  If we have 10 crews all offline then sequential is impossible.

Hope that helps.

View solution in original post

0 Kudos