Select to view content in your preferred language

change / update attribute values in an existing feature layer based on a response from within Survey123

740
1
Jump to solution
06-20-2023 02:16 PM
jhansen_GEI
New Contributor II

I am making a survey that will be filled out for a 20m x 20m grid system. There are over 100 individual squares that need to be surveyed. I have a web map with a polygon layer of the grid. I want to have an attribute field called "Completed" change from 'No' to 'Yes' when a user submits a survey entry that matches the grid number for a specific square. 

 

Does anyone know if it is possible to change / update values in an existing feature layer based on a response from within Survey123?

I haven't been able to find much info on this (using S123 Connect)

 

0 Kudos
1 Solution

Accepted Solutions
ZacharySutherby
Esri Regular Contributor

Hello @jhansen_GEI

One option would be to point the survey to the existing polygon layer so that when users are filling out the survey they are editing that exact record. 

Another option if you wanted to keep the survey responses separate from the polygon layer would be to use a webhook that makes a request to the polygon layer updating the attribute value. The webhook would run on each survey submission, query the polygon layer based on the grid entered in the survey, then run an updateFeatures REST API request or an applyEdits request to update the completed field. 

Thank you,
Zach

View solution in original post

1 Reply
ZacharySutherby
Esri Regular Contributor

Hello @jhansen_GEI

One option would be to point the survey to the existing polygon layer so that when users are filling out the survey they are editing that exact record. 

Another option if you wanted to keep the survey responses separate from the polygon layer would be to use a webhook that makes a request to the polygon layer updating the attribute value. The webhook would run on each survey submission, query the polygon layer based on the grid entered in the survey, then run an updateFeatures REST API request or an applyEdits request to update the completed field. 

Thank you,
Zach