Survey123 Connect - edit existing features via survey, disallow feature layer editing

214
5
2 weeks ago
ademshark
Occasional Contributor

I'm using Survey123 Connect with a feature layer (hosted) on ArcGIS Online.

Currently, I have a feature layer used within a Dashboard, all publicly available. Though, some folks within my organization will need to pop in from time to time and make edits to that feature layer. So, I have generated a survey that allows edits on that feature layer. For the time being I would like to keep the survey public so that anyone in my org can submit (foregoing the process of getting them AGO accounts).

I found a solution to add a password to the survey form that I can provide to individuals that I would like to have supply edits to the feature layer. This is all good a fine, however now I am finding that in order for the survey to submit edits, I have to have editing enabled now on the feature layer, which opens the possibility of anyone editing the feature layer directly.

Is there a way around this? To basically just allow the survey submissions to edit the data within the feature layer?

I have tried various combinations of edit permissions but cannot seem to get anything to work. It seems kind of silly to have to open up a feature layer to edits just to allow survey submissions on it. Am I missing something?

Thank you!

0 Kudos
5 Replies
clt_cabq
Frequent Contributor

Can you create a view of the feature class that doesn't have editing allowed?

hosted feature layer views documentation 

0 Kudos
ademshark
Occasional Contributor

I suppose I can, but the issue still remains that in order to have surveys submitted to the feature layer, it has to be publicly available and editable. In other words if I try to make the layer private, but allow edits, I find that surveys are not allowed to be submitted (which is what the S123 website settings also say).

0 Kudos
clt_cabq
Frequent Contributor

I think you can use the original hosted layer as a resource for survey 123, but used the view with no editing capability in the public dashboard.

From the documentation:

For example, you can allow members of your organization to edit the hosted feature layer but share a read-only feature layer view with the public.


 

ademshark
Occasional Contributor

deleted reply

0 Kudos
MobiusSnake
MVP Regular Contributor

It seems kind of silly to have to open up a feature layer to edits just to allow survey submissions on it.

That's how surveys write to the data source though, the survey is just a thin user-friendly front-end for the feature layer's REST API.  Surveys write to the feature layer, they don't use any special side-channels or anything like that.  If you lock down the feature layer, the survey can't make edits.

I don't think there's an easy solution besides buying licenses and keeping your data secure, but a complicated solution would be to have a form create new records in a separate feature layer (using a view that allows adds only, no reads, no updates), and then some Python code in a scheduled notebook or a webhook that first validates the password, then uses an unique ID in the data to copy the edits to the real, secure data source.