Discussions

 View Only
  • 1.  Hyperlink to Google Maps

    Posted 04-07-2021 21:08

    Attempting to build a link that would navigate users to a google map page.  What am I doing wrong? Using the logic below results in an "http://<a href=" ahead of the url. i.e. http://<a href=http://:www.google.com/maps/search/?api=1&query=> Street 1 City State Zip</a>

    var text Words = ([Account - Venue Address: Street 1]&" "&[Account - Venue Address: City]&" "&[Account - Venue Address: State/Region]&" "&[Account - Venue Address: Postal Code]);
    var text URL = ("http://:www.google.com/maps/search/?api=1&query=");
    "<a href=" & $URL & ">" & $Words & "</a>"




    ------------------------------
    Ryan Parr
    ------------------------------


  • 2.  RE: Hyperlink to Google Maps

    Posted 04-08-2021 08:54
    not tested recently, but try this. Let me know if it works.


    var text URL = "http://maps.google.com/maps?f=q&hl=en&q="
    &URLEncode([Account - Venue Address]);

    var text Words = ToText([Account - Venue Address]);

    "<a href=" & $URL & ">" & $Words & "</a>"


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Hyperlink to Google Maps

    Posted 04-08-2021 11:53
    Using that method still results with a "http://<a href=" prepended to the url.

    ------------------------------
    Ryan Parr
    ------------------------------



  • 4.  RE: Hyperlink to Google Maps

    Posted 04-08-2021 11:55
    np,
    The field type should be set to Formula Rich text.  NOT Formula URL.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: Hyperlink to Google Maps

    Posted 04-08-2021 11:59
    That worked! But I was attempting to make it a button.

    ------------------------------
    Ryan Parr
    ------------------------------



  • 6.  RE: Hyperlink to Google Maps

    Posted 04-08-2021 13:53
    Edited by Michael Tamoush 04-08-2021 13:55
    Here's what I use for a button. You can play around with every setting to change the look (more rounded, less rounded, different color background/font/border, etc). If I remember correctly I got this from Kirk Trachy's Magic Buttons.

    var text URL = "http://maps.google.com/maps?f=q&hl=en&q="
    &URLEncode([Account - Venue Address]);

    var text Words = ToText([Account - Venue Address]);

    "<a style=\"text-decoration:none; background: #305988; border-radius: 5px; color: #ffffff; display: inline-block; padding: 4px 0px 0px 0px; width:194px; height:22px; text-align: center; text-shadow: none; border: 1px solid #030404; font-size: 12px \"href='"
    & $URL
    & "'>" & $Words & "</a>"


    Notes:
    -The padding is top,right, bottom, left. Or you can remove two of them and it becomes top/bottom, right/left
    -If you remove the height or width it will auto determine it based on the font size etc.
    -Make border radious 1000px for a fully rounded button
    -I've never played with 'text-decoration' so I don't actually know what that is lol. But I suspect a quick google will solve that.
    ------------------------------
    Mike Tamoush
    ------------------------------