AnsweredAssumed Answered

Using Survey123 @geopoint to automatically fill a text survey field

Question asked by ben_vk on Oct 11, 2018
Latest reply on Oct 11, 2018 by ben_vk

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?

Outcomes