Advice for best work around to capture location input for survey (geopoint, geocode)

873
3
08-18-2022 02:22 PM
SummerKoszti
New Contributor III

Hi Team, 

I require some advice / assistance for capturing the location input by the survey user. 

Firstly, the survey is designed for children so needs to be easy (mind you, they are pretty tech saavy).

Initially I used geocode and set the parameter to only allow a New Zealand address to be selected. The issue I ran into is the address (depending on phone used) put me off the cost of Africa. 

I then created a geopoint, so the user had to select by the map by inputting their address in. This does work, however I feel like it is quite clunky, and additionally I have had no luck finding a solution to only enable a New Zealand address to be selected. 

I assume the geocode is going off the phones location, and geopoint enables the location to be selected. 

Is there was a way that I could use geocode to get my address, then this automatically geopoints the address in the map WITHOUT having to go in and confirm it as such. Ideally, I'd like to hide it. 

The last option would be to geopoint using map and only have NZ address available to select. I am not sure the best way to do this.

Thank you. 

0 Kudos
3 Replies
LaurenceTait
Occasional Contributor II

If you were getting blank geopoints (0,0 - off the coast of Africa) then I am guessing that you didn't actually calculate the geopoint from the address questions. What was being recorded was the location of the phone when the app was started. If the phone didn't have a GPS lock, it will put the geopoint at 0,0. 

So long as you calculate the geopoint from the address input, then it will be valid and can't be off the coast of Africa. (Unless your users are forgetting to fill out their address.)

The other benefit is that so long as your geopoint has valid coordinates then it will automatically appear in the correct location on the map. You can choose to hide the geopoint question or not as you wish.

If you want to have only  New Zealand addresses available to select, you'll need to configure the locators for your organisation's account. See https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-addresses-and-the/...

The alternative is to pull the country code from the address, and use that to set restraints and warnings. That way the user will still be able to select addresses outside New Zealand, but they will be warned what the mistake is and not allowed to submit until they choose the right address.

 

I've attached a working example of the latter.

SummerKoszti
New Contributor III

Thanks Laurence. Appreciate the reply. 

I did end up fixing the issue with the help of a colleague. Slightly different than you suggested above. 

SummerKoszti_0-1662355003183.png

However works as desired.

Thanks, 
Summer

0 Kudos
LaurenceTait
Occasional Contributor II

Same basic solution.

There doesn't seem to be anything in there that to constrains the selection to NZL. so I'm assuming that, so I'm assuming you've configured your locators to restrict the choice.

0 Kudos