Call Collector via Survey123 to collect Polys & Lines with relationship class does not record parentglobalid

726
5
06-07-2019 12:22 PM
WhitneyWeber
Occasional Contributor

I am trying to call Collector via a survey in Survey123 to collect polygons and lines. Attached is a document (old screenshots) with the detailed process as well as my spreadsheet, but following is an overview of the steps I took:

  • create survey in Connect via spreadsheet using repeat sections for polys and lines
  • publish survey, collect 1 point and download gdb
  • add line & poly fcs to gdb, add globalid and relationship class to write globalid from survey into parentglobalid in line & poly fcs, as done with table repeats
  • publish the gdb and point the survey form to the hosted feature layer
  • refresh the survey and add form_title, form_id, and submission_url to spreadsheet

  • update note which calls Collector to map line, poly. question - these are of note type as when had as geotrace and geoshape types, it did not work, although I can't remember why. As such, they are reflected as strings and tables within the schema rather than Feature Layers
  • republish, collect data, download. Get error upon downoading so downloaded via python script referenced in View your results—Survey123 for ArcGIS | ArcGIS.
  • lines & polys recorded in fc, but parentglobalid is still not populated, despite relationship class.

So, I'm still at square one with no way to relate my line and polygon data to my original survey.

Somebody please take pity on me and tell me what I am missing!

Tags (2)
0 Kudos
5 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Whitney,

The extra lines in settings are not needed, though that should not cause an error on export.  In your link to open Collector, I don't see you specifying the parentglobalid as per GitHub - Esri/collector-integration: Multi Language repository that contains documentation and sampl... .  You would need to have that in the URL for the value to be prepopulated.

0 Kudos
WhitneyWeber
Occasional Contributor

Thanks for the response, James

I had tried to pass the globalid from the survey to parentglobalid in Collector, but could not get the syntax right, I'm assuming, as it never worked. I reported that in another post. The link you pointed me to unfortunately only covers how to pass a static value, not a value from a field. I tried the following URL encoded syntax, which was unsuccessful.:

&featureAttributes=%7B%22parentglobalid%22:globalid%7D

I would be very curious to know how to do this correctly! I found an article which indicated how to do so going to survey123, but the same syntax does not work when going to Collector.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Whitney,

This would be difficult to support currently in Survey123 as there is not direct access to the globalid of the form submission; the globalid is also not populated until the feature is submitted (so it may only work in Inbox scenarios).

0 Kudos
DougBrowning
MVP Esteemed Contributor

Like I mentioned before I would try to stop using glocalids and use your own PrimaryKey in a text field and pass that.  This will all get much easier.

0 Kudos
WhitneyWeber
Occasional Contributor

The only way I know to create a unique id is by creating a GUID field. I did that and it still doesn't pass to Collector. Following is the syntax I'm using - is my syntax wrong? If so, please suggest the correct syntax! parentglobalid is the field name in the polygon fc being collected via Collector and UniqueSurveyID is the field in the survey.

<a href="arcgis-collector://?itemID=9f23ea7ae9bd4456b5c9d522a1ce6e4c&featureSourceURL=https://services.arcgis.com/EVsTT4nNRCwmHNyb/arcgis/rest/services/Source_Features_Collector/FeatureServer/2&featureAttributes=%7B%22parentglobalid%22:UniqueSurveyID%7D">Map a Polygon</a>

0 Kudos