Change delimiter from comma to list multiple latlong values separated by "/"

I’m looking how to change the delimiter from a comma to a forward slash to be able to create a link in google maps with multiple lat long values. Between every lat long set of coordinates needs to be a / in order to create the link. As you can see in the results below, the last set of coordinates is separated by a comma.. I thought of Substitute for this but I can’t figure out how to keep the commas where they need to be?

Current: HYPERLINK(SUBSTITUTE(CONCATENATE(“https://www.google.com/maps/dir/”,HERE(),“/”,[Lat Long],“/”,
[Related Stops][Lat Long])," “,”"),“Map Link”)

Results: https://www.google.com/maps/dir/41.891633,-107.881736/41.897073,-107.930549**,**41.946416,-107.986634

I’m open to other ways of creating the link, this is just how far I got so far..

Please try below

You seem to be having a column called [Lat Long] in the child table “Stops”. In that table please create another VC (text type) called say [LatLong_With_Slash] with an expression something like CONCATENATE([Lat Long], “/”)

Then the hyperlink expression can be something like

HYPERLINK(CONCATENATE(“https://www.google.com/maps/dir/”,HERE(),“/”,[Lat Long],“/”,
[Related Stops][LatLong_With_Slash]) ,“Map Link”)

1 Like

I think that is a step in the right direction, however, Appsheet will still insert a comma in-between the values which will mess-up the link..

I also tried an enum list with a forward slash as the delimiter and an app formula to populate, however it still inserts the commas..

Virtual Column results: https://www.google.com/maps/dir/41.563787,-107.705529/41.589446,-107.751004/,41.611637,-107.742139

Could you mention your desired format with an example how it should look?

Would you like a backward slash “/” between individual lat , long values as well?

Edit: Please try below.

Please create a VC called say [LatLong_New] in the “Stops” table with an expression something like SUBSTITUTE([Lat Long],“,”,“|”)

Then the hyperlink expression can be something like

HYPERLINK(SUBSTITUTE(SUBSTITUTE(CONCATENATE(“https://www.google.com/maps/dir/”,SUBSTITUTE(HERE(),“,”,“|”),“,”,SUBSTITUTE([Lat long],“,”,“|”),“,”,
[Related Stops][Latlong_New]),“,”,“/”),“|”,“,”) ,“Map Link”)

2 Likes

YES! You my friend are a Genius!!! @Suvrutt_Gurjar Thank you so much, the result is perfect :slightly_smiling_face:

1 Like

You are welcome! Nice to know it works the way you want.

1 Like