Query Parcel Data in Survey

04-13-2020 10:39 AM
New Contributor III

Hi, I recently watched Esri Emergency Management Webinar Series: Best Practices for Conducting Damage Assessments Resources.  In it the presenter demonstrated the ability to query parcel data to populate fields on his form.  This would be extremely useful for identifying property owners and property value.  I’m trying to replicate this ability but I’m having trouble.


The process involves loading existing features into the form using the Inbox.  This looks to have been designed to allow people to edit those features using the survey form.  It’s not the parcels that I need to edit though, but the Damage Assessment features, a separate hosted feature class. I just want to pull attributes from the intersecting parcels.

As far as I know, you can only edit one feature class in a form at a time.  I don’t see a way to load two feature classes in the form so that I can edit one and query the other.

Does anyone know how this can be done?


Tags (1)
0 Kudos
1 Reply
Esri Notable Contributor

Hi Josh Saad‌  In the video, the demonstration does not use the Inbox. It simply uses a custom JavaScript function to query the parcel layer using the current user's location. The output of the query is stored as an attribute.  You can find how to work with custom JavaScript files in this way through this help topic in the Survey123 Early Adopter Program.  Please note that the use of custom JS functions is not officially supported at the moment.  There are still some rough edges we want to work on before we officially support this: You need to reopen Survey123 Connect every time you change the JS file, JS Functions are not yet supported in the Survey123 web app.

The advantage of using this approach with custom JS functions is that the query happens live when the user is capturing data in the field. However, keep in mind that the query is done against a feature layer, so the user must be connected. If you need to support offline workflows and still automatically get the id of the intersecting polygon I suggest you look at implementing similar functionality using web hooks. Through a web hook, the calculation of the intersecting polygon happens when the data has been submitted, so it does not matter if the user is offline when the point is captured.