Survey 123 - Using geoshape as geometry causes submission error

05-11-2020 04:33 AM
New Contributor

When using geoshape as geometry the survey returns an error on submission that it cannot map a Polygon object to a type. (No mapping exists from object type ESRI.ArcGIS.Client.Geometry.Polygon to a known managed provider native type)

Using geotrace and geopoint allows you to submit the survey without issue.

I have modified the geoshape/geotrace example survey from connect and attached which creates the issue for me.

Is there a workaround or am I implementing this wrong? I guess this is related to there not being a default mapping for this question type as documented at , though it also documents that geotrace is also not implemented which seems to work so I assume has been updated since?

3 Replies
New Contributor

On playing with this some more it seems to actually be to do with where the geometry field you wish to use is positioned in relation to geometry rows where the ESRI fieldType is set to null. I noticed this effects the schema, so with the example above I noticed that:

If the geoshape is sat below the geotrace (with fieldType set to null) then the Schema does not show any geometry fields

If you move the geoshape above the geoTrace (with fieldType set to null), then the schema changes and includes the geometry field.

Publishing with the geoshape first then avoids the error in the question. Interestingly as well, after the initial publish you can then move the structure back to that of the first and republish as the feature service must now have this mapped.

Interested to know if there is a more direct way to publish fields in the order you want them and let Survey123 Connect know which field you want to use as geometry or to ignore fields that have fieldType set as null.

New Contributor III

Thank you for this! Works wonderfully on a survey I was having a similar issue with.

0 Kudos
New Contributor

Thanks for this. It worked out perfectly for me


0 Kudos