Restrict adding new records to hosted feature layer to only Survey 123 webform or app

405
3
02-01-2023 07:41 AM
ColForbin
Occasional Contributor

For a public survey 123 survey published to ArcGIS Online, obviously the underlying feature layer (or feature layer view) must allow editing/adding records by public users.  This means that a public user with a free ArcGIS Online account, could, if they were so inclined, discover the associated feature layer, open it in Map Viewer, and add features at will.

Is there a way to restrict the adding of records to a hosted feature layer in ArcGIS Online to only a Survey 123 web form or the Survey 123 app?

thanks

0 Kudos
3 Replies
Richard_Purkis
Esri Contributor

Hi @ColForbin 

I believe the resolution from this thread is the same resolution for you

Using the new pulldata("@layer") function you can count the number of records submitted to a survey (granted that your survey layer has query capabilities enabled).   With that, you can build a constraint to prevent further submits, and show a message indicating that the survey is closed.

Check out this video on minute 22:10, as it describes how to do it. Also some additional help in this blog, and this help topic.

Thanks

0 Kudos
ColForbin
Occasional Contributor

Thanks @Richard_Purkis  for the suggestion.  This seems to address restricting the adding of records through a Survey 123 web form based on the number of records in the feature layer.  I am wondering if there is a way to restrict the adding of new records to the underlying feature layer of a Survey 123 survey at the feature layer level based on what application is being used.  So because the feature layer is shared to the public and allows adding new features, a user could add features to that layer through the Map Viewer in AGO, and not using the Survey 123 web form.

To test this, I created a public survey in AGO in my organization's account.  I then searched for the feature layer in AGO using my personal free AGO account, and added it to a web map.  I was then able to add features to this feature layer using the Map Viewer, thereby bypassing the survey web form.  The downfall of this is that someone could potentially add dozens of meaningless features to the survey's feature layer.

0 Kudos
Richard_Purkis
Esri Contributor

@ColForbin Sorry you are right, I misinterpreted your query

0 Kudos