HOW TO
This article describes how to use the pulldata() expression in Survey123 Connect to concatenate multiple reverse geocoding results from a single geopoint question into a single value. While reverse geocoding is often used to return an individual address component such as a street name, city, or postal code, some workflows require a more complete location description. By combining multiple reverse geocoding fields, authors can create custom address strings that better meet their organization's reporting, display, or data collection needs. This article provides an example workflow for retrieving and concatenating multiple address attributes from a geopoint location.
The pulldata("@geopoint") expression is used to retrieve information from a geopoint question in a Survey123 form. When a user captures a location, Survey123 can perform reverse geocoding and return various address-related attributes associated with that location, such as the street address, city, region, postal code, and place name.
The expression uses the concat() function to combine multiple reverse geocoding results returned by pulldata("@geopoint") into a single text string.
Example:
concat(
pulldata("@geopoint", ${GeopointQuestionName}, "reversegeocode.address.Address"),
', ',
pulldata("@geopoint", ${GeopointQuestionName}, "reversegeocode.address.City"),
', ',
pulldata("@geopoint", ${GeopointQuestionName}, "reversegeocode.address.RegionAbbr"),
' ',
pulldata("@geopoint", ${GeopointQuestionName}, "reversegeocode.address.Postal")
)
Where:
concat() combines text values into a single string.@geopoint specifies that the pulldata() function should retrieve information from a geopoint question.${GeopointQuestionName} is the name of the geopoint question from which the reverse geocoding results will be retrieved. This will need to be changed to the actual name of the geopoint question."reversegeocode.address.Address" returns the street address."reversegeocode.address.City" returns the city name."reversegeocode.address.RegionAbbr" returns the abbreviated state, province, or region."reversegeocode.address.Postal" returns the postal or ZIP code.', ' and ' ' are literal text values used to insert commas and spaces between the returned address components.For example, if the reverse geocoding results return:
380 New York StRedlandsCA92373the expression returns: 380 New York St, Redlands, CA 92373
The table below provides the available reverse geocoding return fields that can be used with the pulldata() and concat() functions to customize reverse geocoding results.
| Return Field | Description |
|---|---|
reversegeocode.address.Match_addr | Full matched address returned by the geocoder |
reversegeocode.address.LongLabel | Complete formatted address with all components |
reversegeocode.address.ShortLabel | Abbreviated formatted address |
reversegeocode.address.Addr_type | Type of location match (POI, Street Address, Point Address, etc.) |
reversegeocode.address.Type | Place category or feature type |
reversegeocode.address.PlaceName | Name of the matched place or point of interest |
reversegeocode.address.AddNum | Street number |
reversegeocode.address.Address | Street address without city, state, or postal code |
reversegeocode.address.Block | Block information, if available |
reversegeocode.address.Sector | Sector information, if available |
reversegeocode.address.Neighborhood | Neighborhood name |
reversegeocode.address.District | District name |
reversegeocode.address.City | City name |
reversegeocode.address.MetroArea | Metropolitan area |
reversegeocode.address.Subregion | Subregion or county |
reversegeocode.address.Region | State, province, or region name |
reversegeocode.address.RegionAbbr | Abbreviated state, province, or region |
reversegeocode.address.Territory | Territory name |
reversegeocode.address.Postal | Postal or ZIP code |
reversegeocode.address.PostalExt | Postal code extension |
reversegeocode.address.CntryName | Country name |
reversegeocode.address.CountryCode | Country code |
reversegeocode.address.X | X-coordinate of the matched location |
reversegeocode.address.Y | Y-coordinate of the matched location |
reversegeocode.address.InputX | X-coordinate of the input geopoint |
reversegeocode.address.InputY | Y-coordinate of the input geopoint |
This approach provides greater control over the formatting of reverse geocoding results and allows specific address components to be included or excluded as needed.
Article ID: 000043907
Get help from ArcGIS experts
Start chatting now