HOW TO

Display questions based on the geopoint question in ArcGIS Survey123 Connect

Last Published: May 9, 2022

Summary

When creating a survey in ArcGIS Survey123 Connect, it is possible to control the visibility of a question in the survey based on the value of a geopoint question. For example, when a question must be shown if the geopoint is in a specific city.

Procedure

To tie the visibility of a question based on the value of a geopoint question, use the pulldata and reverse geocoding functions on a note question type to find the location of the geopoint question. Then set the desired location in the relevant column of the question tied to the location. The pulldata reverse geocode can be based on either an address or other parameters created in a reverse geocode, such as the city.

For example, with a geopoint in Redlands, create a note question type in the survey that pulls the city from the reverse geocoded address of the geopoint. Use the following calculation in the calculation column for the note question type.

pulldata("@geopoint",${location},"reversegeocode.address.City")
Screenshot of the XLSForm with the pulldata calculation highlighted

This pulls the city name of the reverse geocoded address. In the question that becomes visible based on the geopoint location, add this statement to the relevant column.

${address}="Redlands"
Screenshot of the XLSForm with Redlands highlighted

By this configuration of the survey, the text question type is only visible if the value of the note question type is Redlands.

Screenshot of the survey showing the hidden text type when Redlands is geocoded.

The value used from the geocode can be other parameters, such as the matched address reverse geocode output, with the following calculation in the calculation column of the note question type:

pulldata("@geopoint",${location},"reversegeocode.address.Match_addr")
Use the following statement in the relevant column of the question tied to the note:
${address} = "W Fern Ave & Terracina Blvd, Redlands, California, 92373"

For more information on the specific parameters of an address from the reverse geocoding, refer to ArcGIS REST API: Choosing specific output features.

Note:
Applications are contractually prohibited from storing the results of reverse-geocoding transactions unless requested by passing the forStorage parameter with a value of 'true' and the token parameter with a valid ArcGIS Online token. ArcGIS Online service credits are deducted from the organization account for each geocode transaction that includes the forStorage parameter with a value of 'true' and a valid token. For more information on credits and how they are charged, refer to Esri: Credits.

Article ID:000019081

Software:
  • ArcGIS Survey123 Connect

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options