Clickable google map link using latitude and longitude listed in choices sheet

1. What is the issue? Please be detailed.

I am trying to set up a clicakble googlemap link using a list of longitudes and latitudes defined in choices sheet. I have used the choose_property and concat syntaxes in survey sheet aswell but I get an error related to:

Error: ODK Validate Errors:
***>> Something broke the parser.
Error evaluating field 'lat' (${lat}[1]): The problem was located in Calculate expression for ${lat}
XPath evaluation: cannot handle function 'choose_property'
Caused by: org.javarosa.xpath.XPathUnhandledException: The problem was located in Calculate expression for ${lat}
XPath evaluation: cannot handle function 'choose_property'
... 10 more

The following files failed validation:
${mohdbuskt} v5.xml***

Result: Invalid

2. What steps can we take to reproduce this issue?

I have attached a copy of the excel file so exact replication of the problem.

3. What have you tried to fix the issue?

I have check parenthesis, comma, and correct names of inputs to all syntaxes involved still no luck.

4. Upload any forms or screenshots you can share publicly below.

This is a screen shot of my survey sheet.

Below is a screen shot of my choices sheet

screenshot of the error.

Hello @becsltd,

Try using these calculations for lat and long variables:

instance('locations')/root/item[name=${choose_place}]/latitude

instance('locations')/root/item[name=${choose_place}]/longitude

Now I get this error when i used the line you suggested.

gmaps navigation.xlsx (84.6 KB)

Try this form - it will lookup lat/long and build a complete 'navigate to' google maps url which is of the form https://www.google.com/maps/dir//destination-lat,destination-long/

If you grab the user's location via background geopoint or other means you can build a navigate from to' url as https://www.google.com/maps/dir/start-lat,start-long/destination-lat,destination-long/ but this is less critical on mobile as the app knows your location if location services are on.

If you were using entities and storing geopoints you could also extract lat/long from them directly using selected-at - see the mylat and mylong fields in the example.

Thank you very much for the suggestions. They all work better than my previous attempt.