Select to view content in your preferred language

Pulldata not auto populating @json results

1768
13
06-20-2022 07:30 AM
JoshOsowiecki
Emerging Contributor

I am creating a follow-up survey for our program and when viewing our data in the Survey123 dashboard it will be helpful to have the county of our program participants.

I have used the string(pulldata("@json",${address})) calculation to populate the extractable features from the geocode source. The properties I would like to extract are "Subregion" (in our case will be used to represent county since the @json does not populate the county) and "City".

When I update the Survey I do not get any error messages, the fields of Subregion and City that I want to auto populate do not auto populate they are left blank. The calculation I am using to auto populate is below:
pulldata("@json",${address_json},"Subregion")

I have tried many different variants of the calculation and am still unable to get the field to auto populate.

I have attached photos of the rows in my sheet I am having trouble with as well as the json pulldata results.

 

0 Kudos
13 Replies
IsmaelChivite
Esri Notable Contributor

Hi. Add attributes. as a prefix and life will be good!

IsmaelChivite_0-1655740192170.png

County.gif

 

JoshOsowiecki
Emerging Contributor

@IsmaelChivite Thank you!! This worked perfectly! 

0 Kudos
jeffhyderBRVA
Emerging Contributor

@IsmaelChivite I am having a similar problem. I have my json response but I am unable to populate my calculate with my pulldata.. I tried "macAddress.lastData.tempf" ,  "lastData.tempf" and just "tempf" none of them will caculate.

using pulldata("@json", ${weather_json}, "macAddress.lastData.tempf")

attached is a screenshot of my json response.JSON_response.jpg

0 Kudos
jeffhyderBRVA
Emerging Contributor

@ChrisLeSueur if you need me to include anything else, please let me know.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi @jeffhyderBRVA - the JSON you provided begins as an array ([]), not an object ({}).  You need to address the first element of the array ([0]):

pulldata("@json", ${weather_json}, "[0].macAddress.lastData.tempf")

I'm guessing you're using a JavaScript function to retrieve this information - as an alternative modify the function to return the first (or another) element as opposed to the entire array.

0 Kudos
jeffhyderBRVA
Emerging Contributor

Deleted

0 Kudos
jeffhyderBRVA
Emerging Contributor

deleted

0 Kudos
jeffhyderBRVA
Emerging Contributor

deleted

0 Kudos
jeffhyderBRVA
Emerging Contributor

I forgot to tag you @JamesTedrick 

0 Kudos