Is it Possible to generate which Census Tract an Address is in Using Survey123

687
4
Jump to solution
06-20-2022 11:00 AM
JoshOsowiecki
New Contributor II

I am currently creating a follow-up tracker for our program and HUD would like us to document the census tract that each of our program participants resides in. Is there a way to have Survey123 generate the census tract for an address, that I can then use pulldata to hold the values for the dashboard display?

Attached is an image of what I currently have.

0 Kudos
1 Solution

Accepted Solutions
IsmaelChivite
Esri Notable Contributor

Here is an XLSForm showing how to do it for the web app using pulldata("@layer"). As described in the Early Adopter documentation, Survey123 Connect does NOT support this yet, but if you publish the survey and test it in the web app, it will run fine. It uses the 2020 Census Tract from this layer of the Living Atlas.

Census.gif

 

View solution in original post

4 Replies
IsmaelChivite
Esri Notable Contributor

Yes. This is possible, if you have a layer with the census polygons.

If using the Survey123 web application, check the pulldata("@layer") section in this blog: https://community.esri.com/t5/arcgis-survey123-blog/survey123-april-2022-now-available-in-beta/ba-p/...

The pulldata("@layer") syntax allows you to do a point in polygon query against your own layer. It is in Beta at the moment, but we have deployed the code already in production, so it is easy to give it a try.  We plan to make this generally available and supported in September this year, although some people are already using it in Beta.

You could also do this with a custom JS function, which has been supported for a while.  Or even a web hook to automatically populate the census tract once the data has been submitted.

IsmaelChivite
Esri Notable Contributor

Here is an XLSForm showing how to do it for the web app using pulldata("@layer"). As described in the Early Adopter documentation, Survey123 Connect does NOT support this yet, but if you publish the survey and test it in the web app, it will run fine. It uses the 2020 Census Tract from this layer of the Living Atlas.

Census.gif

 

JoshOsowiecki
New Contributor II

@IsmaelChivite ,

Thank you for the help! I am running into an error when I try to update my form with the suggested calculation. I am using the below calculation

pulldata("@layer","getRecord","https://bethlehem-pa.maps.arcgis.com/apps/mapviewer/index.html?webmap=8f22464a082b44b88939adf8b2ed6c..., USA Census Tract)

I am receiving the attached errorScreenshot 2022-07-08 144503.pngScreenshot 2022-07-08 144537.pngScreenshot 2022-07-08 144602.pngScreenshot 2022-07-08 144622.png

I cannot figure out how to make this work. Any assistance would be very greatly appreciated!

 

Thanks,

Josh

0 Kudos
JoshOsowiecki
New Contributor II

@IsmaelChivite Worked like a charm, thank you!

0 Kudos