I created a survey through Connect. I added a filter (${site_list="~NEW"} such that the geopoint question is only visible when a new location is being entered. However, the 'map' interface isn't visible in the survey. One must click on the icon to render the map in a new window. I tried several iterations to see where the issue is coming from and it appears to be only when there is a relevant filter set. I've attached an example xlsform. I'm using v3.19.
Solved! Go to Solution.
When you open the survey form to collect data, the device will immediately capture location data. Geopoints will have a point location and geotrace or geoshape will centre on your location but not start drawing.
The issue with the relevant is that the question is not there when the form loads, so the location capture does not prepopulate the geopoint with the initial opening. In @abureaux's case when using body::esri:visible, the question is 'there', just invisible, so it calculates on form load. This resolves the issue partially but is problematic as it will always capture the location data. That would be bad for Inbox editing.
In both the above examples, the map won't appear if the users location is not accessible to the Survey123 field app i.e. you've denied it in device settings.
Using your Form provided:
If you do not have GPS enabled the users will need to interact with the question. You might see this on Survey123 Connect or your device if location access is not allowed. Should be easy enough to test on another survey without the relevant.
There may be some world where you can have a default value to show a map e.g. centre on xy with a calculatiodMode=whenEmpty but I think this would be a disaster as you'd be prefilling the question with the same location time and time again.
I don't believe it's possible to show the geopoint question without the point on the map in the field app. So you need to default the GPS at your users location through the form open, position keyword in default, or a calculation to preset it.
Otherwise... not the end of the world for users to click a button?
Website or field app?
My understanding is the map won't appear until it has a location value. It could be that the relevant filter is preventing the user's location from loading or populating the map.
Try adding a default or calculated location to the geopoint question. If you want the users current location, add the word position to the default column. It'll default to the users GPS if available.
This issue only occurs in the app (desktop and mobile). It automatically displays the map interface once the user chooses '~NEW' in the browser version. However, our functionality requires the user to use the app as we have Inbox active.
One must click on the icon to render the map in a new window
This is expected behaviour with this set up.
Have you considered using body::esri:visible? It works the same as relevant, but the element hidden still exists even when not visible. You need to take this into account though if you are expecting hidden elements to return "null" values, since they will contain data like normal.
Using body::esri:visible in place of relevant provides the same result. If it is expected behavior, why does it display the map interface in the web browser version of the survey but not in the app version?
Web interface is a very different application. While the underlying elements are the same, the Web and Field Apps handle these same elements differently.
That said, when I swap to body::esri:visible, I get this
As compared to relevant (again, this is what I would expect from a geopoint shown by a relevant statement):
Hm, I'll have to see what the issue is because when I use ${site_list}='~NEW' in body::esri:visible and not in the relevant column, I'm still not replicating what you have presented in the app and still not seeing the map.
Thanks, it was user error on my part by still leaving the relevant field complete!
When you open the survey form to collect data, the device will immediately capture location data. Geopoints will have a point location and geotrace or geoshape will centre on your location but not start drawing.
The issue with the relevant is that the question is not there when the form loads, so the location capture does not prepopulate the geopoint with the initial opening. In @abureaux's case when using body::esri:visible, the question is 'there', just invisible, so it calculates on form load. This resolves the issue partially but is problematic as it will always capture the location data. That would be bad for Inbox editing.
In both the above examples, the map won't appear if the users location is not accessible to the Survey123 field app i.e. you've denied it in device settings.
Using your Form provided:
If you do not have GPS enabled the users will need to interact with the question. You might see this on Survey123 Connect or your device if location access is not allowed. Should be easy enough to test on another survey without the relevant.
There may be some world where you can have a default value to show a map e.g. centre on xy with a calculatiodMode=whenEmpty but I think this would be a disaster as you'd be prefilling the question with the same location time and time again.
I don't believe it's possible to show the geopoint question without the point on the map in the field app. So you need to default the GPS at your users location through the form open, position keyword in default, or a calculation to preset it.
Otherwise... not the end of the world for users to click a button?