I have created a survey public agencies to use for create lat/long's for existing locations (addresses is not sufficient). I am using reverse geocode and then filtering a `select_one` with `city={city}. The webform works fine signed in or not. The app works fine, logged in. The reverse geocode will not populate `city` if not logged in on the mobile app. What am I missing?
Solved! Go to Solution.
Hi again Ian Horn
Looking at this more closely. I invoked the web service via http and used the latest version of the field app in the app store to test. Everything worked as expected: I was able to get reverse geocode values when logged in and also when logged out.
Below is the spreadsheet I used to test.
Hi Ian, what geocoding service are you using? Using the ArcGIS World Geocoder consumes ArcGIS Online credits, so in order for you to access the service, you must be logged in.
I have not tested this yet but might be worth a try to use a geocoder service that is publicly available.
I am using our geocoding service which we provide publicly: https://kygeocode.ky.gov/arcgis/rest/services/Internal/Ky_Geocode_Internal/GeocodeServer
Hi Ian. Thanks for your question. We need to investigate this a bit further. We indeed require a token when accessing secure services and our own Esri World Geocoding service, but we need to check the behavior in the field app with public locator services as it may be requiring you to be logged-in, when it should not.
Hi Ian Horn I am having problems connecting to the locator service you reference. See animation below.
Yes, so am I.
Ian Horn
Systems Engineer IT
Office of IT Architecture & Governance
Commonwealth Office of Technology
669 Chamberlin Ave
Frankfort, KY. 40601
502-782-6745
ian.horn@ky.gov<mailto:ian.horn@ky.gov>
https://kygeonet.ky.gov
I just tried through an out of network wifi: https://kygeocode.ky.gov/arcgis/rest/services. I can get to our internal/geocode_server. It’s my understanding this should be a public service we provide. I’ll have to check with my supervisor to see what may be going on.
Ian Horn
Systems Engineer IT
Office of IT Architecture & Governance
Commonwealth Office of Technology
669 Chamberlin Ave
Frankfort, KY. 40601
502-782-6745
ian.horn@ky.gov<mailto:ian.horn@ky.gov>
https://kygeonet.ky.gov
Hi again Ian Horn
Looking at this more closely. I invoked the web service via http and used the latest version of the field app in the app store to test. Everything worked as expected: I was able to get reverse geocode values when logged in and also when logged out.
Below is the spreadsheet I used to test.
Thank you Ismael,
My supervisor is aware of the http/https issue. Thank you for your help on troubleshooting this.
On a related note, when testing the app yesterday, I found that the mobile app did not like the `pulldata(“@json” . . . )` but it would allow me to use the `pulldata(“@geopoint” . . ). It is my understanding from some of the help online that once a locator url is identified it is referenced in the following geocoding calculations, but I found that not to be the case. I guess the question here is, should I use @geopoint for all geocoding calculations in the survey or can I reference a json created from first calculation?
Thanks,
Ian
You can use pulldata("@json") to reference a JSON string stored in a question. Typically you will want to use either a hidden or calculate question to keep the JSON value. There is a discussion about using pulldata("@json") in this post: https://community.esri.com/groups/survey123/blog/2019/02/26/using-spike-with-survey123-for-arcgis You can also look for the Spike XLSForm sample in connect. You can look at the XLSForm even if you do not have a Spike device to learn the syntax. When storing JSON values, make sure you use the esriFieldLength column to set the length to a very high value. That way, your JSON strings will not get cut-off.
The reversegeocode functionality is implemented in such a way that you will actually not repeatedly be invoking your locator multiple times if you use @geopoint many times. It caches the response within the calculation cycle in the form (until values change again). Strictly speaking, using @JSON or @geopoint many times will not make a difference in terms of calls made to the locator service.