Select to view content in your preferred language

geopoint fails on iPhone

850
3
Jump to solution
08-07-2023 05:09 PM
ChuckS
by
Occasional Contributor

Hello,

I have a survey with a geopoint question published with Survey Connect version 3.18.123. We have about 150 users and the survey is submitted several times a day using Survey123 3.17.68 for iOS.

In general, the geopoint question usually works fine, but we almost always have a few users who submit records with an invalid lat/lon point. Reverse geocoding fails and the point is displayed off the west coast of Africa. I've attached a screenshot. When I export the Feature layer to Excel, the x, y columns for those records are zero.

In one case, I noticed that the user's iPhone properly had location services turned on. Any ideas on how I can prevent this from happening?

Also, what is the best way to check for this condition in the survey? Currently, I'm checking to see if the following returns an empty string.

pulldata("@geopoint",${MyGeoPoint},"y")

Thanks,
Chuck

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

We have been using required on it for a few years now ok.  Of course test it.

If you are offline and have no sideloaded basemap then the map will not show.  I got an idea out to the 123 team for about a year to add a generic basemap to 123.  That way we can add polygons and lines also.   Are you offline? 

I have seen that every single time 123 updates iOS shuts the location access back off.  I know you said you checked that though.

On your check I would set to decimal type on the pulldata line then check that for 0.  Make it visible for now to see that is going on.

View solution in original post

3 Replies
DougBrowning
MVP Esteemed Contributor

I have a similar case where the user needs to take several geopoints and we want to make sure they re grab the GPS when then get to the second or 3rd sport so not all of them are the same.  We also have some crews open the form while still in the truck and then the geopoint is wrong.

I do this by setting the default column of the geopoint to 0,0.  Then I make it required.  This then stops the user like this.

DougBrowning_0-1691504552530.png

This idea may work for your issue.

Other Idea is to do a pulldata on the geopoint and get the x and y then check those for 0. pulldata("@geopoint", ${GPSBottom}, "x") != 0  You are saying you tried this but my guess is you used calculate instead of decimal type.  That gives you a string.  Try decimal then you can use an appearance of hidden to hide it.

You may even be able to use a constraint in the geopoint of . != 0,0 but no idea of that works.

Hope that helps

0 Kudos
ChuckS
by
Occasional Contributor

Thanks for your response. Is it safe to make a geopoint question required? I was planning to write an error condition to handle when the lat/lon wasn't available on the iPhone. Do I not need to do this?

I think that the reason some of my users submit a zero-zero lat/lon is because they don't tap on the update map symbol:

updateMapSymbol.PNGI think previously the iPhone app would display the map by default, not these symbols. (It seems like Survey123 is a bit of a moving target.) Yesterday, I added a conditional note to tell users to tap the symbols to display the map. This note is only displayed when the latitude is zero. I also have a "Map not available?" group to handle the situation if the map can't be displayed. In that case, they type in a description of the location.

updateMapNote.PNGI check for a zero latitude with either of the following calculations:

Text (check to empty string): pulldata("@geopoint",${MyGeoPoint},"x")
Decimal (check for zero): round(${LatitudeText}, 5)

When I say decimal above, I'm setting the bind::type column to decimal.

Thanks,
Chuck

0 Kudos
DougBrowning
MVP Esteemed Contributor

We have been using required on it for a few years now ok.  Of course test it.

If you are offline and have no sideloaded basemap then the map will not show.  I got an idea out to the 123 team for about a year to add a generic basemap to 123.  That way we can add polygons and lines also.   Are you offline? 

I have seen that every single time 123 updates iOS shuts the location access back off.  I know you said you checked that though.

On your check I would set to decimal type on the pulldata line then check that for 0.  Make it visible for now to see that is going on.