Select to view content in your preferred language

Using Survey123 @geopoint to automatically fill a text survey field

2767
1
Jump to solution
10-11-2018 10:45 PM
BenVan_Kesteren1
Deactivated User

Hey All, 

I have successfully implemented this line to pull data from the geopoint 'point_location' field, and insert JSON code into a second Survey123 Field:

pulldata("@geopoint",${point_location},"reversegeocode")‍

An example of data returned is:

{
   "address":{
      "Match_addr":"517 Logan Rd, North Albury, New South Wales, 2640",
      "LongLabel":"517 Logan Rd, North Albury, New South Wales, 2640, AUS",
      "ShortLabel":"517 Logan Rd",
      "Addr_type":"PointAddress",
      "Type":"",
      "PlaceName":"",
      "AddNum":"517",
      "Address":"517 Logan Rd",
      "Block":"",
      "Sector":"",
      "Neighborhood":"North Albury",
      "District":"",
      "City":"Albury",
      "MetroArea":"",
      "Subregion":"",
      "Region":"New South Wales",
      "Territory":"",
      "Postal":"2640",
      "PostalExt":"",
      "CountryCode":"AUS"
   },
   "location":{
      "x":146.92148550000002,
      "y":-36.056655,
      "spatialReference":{
         "wkid":4326,
         "latestWkid":4326
      }
   }
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

This is fantastic, as the data is correct. I am now wondering how do I ask the survey to only return the match_addr attribute into this column, and in another column I want to store the X and Y values.

I unsuccessfully tried this in the calculation field of my survey:

pulldata("@geopoint",${point_location},"Match_Addr")‍

I know im doing it wrong, but unsure how to fix it. I have found this site, the very bottom two paragraphs give me a hint, but I need an example to help me.

Any ideas?

0 Kudos
1 Solution

Accepted Solutions
BenVan_Kesteren1
Deactivated User

My apologies, I found a fantastic blog by Claire Proctor‌ that answered my question completely.

It can be found here - https://community.esri.com/groups/survey123/blog/2018/07/06/understanding-reverse-geocoding-in-surve... 

I had to use this as my calculation:

pulldata("@geopoint",${point_location},"reversegeocode.address.Match_addr")

Cheers

View solution in original post

1 Reply
BenVan_Kesteren1
Deactivated User

My apologies, I found a fantastic blog by Claire Proctor‌ that answered my question completely.

It can be found here - https://community.esri.com/groups/survey123/blog/2018/07/06/understanding-reverse-geocoding-in-surve... 

I had to use this as my calculation:

pulldata("@geopoint",${point_location},"reversegeocode.address.Match_addr")

Cheers