Adding Hyperlink to table values

mbrady
mbrady Member
edited April 2023 in Beast Mode

Hey all,

 

Does anybody have any experience writing a beast mode formula to insert a hyperlink into a table value within Domo? Can't seem to get it right.

 

Thanks in advance!

Best Answer

Answers

  • mbrady
    mbrady Member

    Thanks! I was able to get the hyperlink value to be clickable, but the link takes me to a page within domo, not to the external link. 

     

    It's basically taking me to a blank page that has the same url as my original domo page with the url i'm trying to link to at the end

  • mbrady
    mbrady Member

    Never mind just figured it out, just needed to add the https:// in front. Thanks for your help!

  • Could you please describe in greater detail, as to what values go where and why?

     

    Unsure what `Link` and `Title` refer to, and, if the ` is necessary. Example data:

     

    A four-cell table. Headers: NAME and COLOR. Values: BOB and BLUE.

    And I'd like BLUE to be a link to this page: https://en.wikipedia.org/wiki/Blue

     

     

    Appreciate your help!

  • AS
    AS Coach

    `Link` and `Title` refer to the columns in the data with the symbols being the column identifiers.  Like `NAME` or `COLOR`.  All beast mode column references require the symbols.

     

    Example:

    CONCAT('<a href="', 'https://en.wikipedia.org/wiki/Blue', `Name`, '</a>')

     

    The name Bob will show up with the underlying link to the Blue wiki article.

     

    You could put a case statement in there to insert the color value into the web link, given the web page is the name from the data.

    Aaron
    MajorDomo @ Merit Medical

    **Say "Thanks" by clicking the heart in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • Hello,

    I am in a very similar situation, but I have a column that already contains the URL. As of now, the URL is not clickable, so I need to make Domo recognize it as a hyperlink that can be clicked on. So I have a column named 'Link' which contains each row's URL. How can I use this column with Beast Mode to make these URL's become clickable hyperlinks? All i need is the raw URL to be clickable. I don't really need the URL to be a hyperlink with a name. Thank you in advance!

     

    Here is what I tried, which led to a new column named 'URL', but no links were populated: CONCAT('<a href="', `Link`, '" target="_blank">', '</a>')

  • Brilliant! Thank you! So very helpful! 

  • nbrx
    nbrx Member

    Does anyone know if this beast mode works in the Mega Table card? I'm having issues with it.

  • king

  • I have been able to succesfully do this in a Mega Table.

  • Hello! thank you! Very helpful.

    One question, do you know if there is a way to make the link open a new window, right now I have the link in megatable but if I click on it the link is opening in the same page, and is a little annoying to go back to domo all the time.


    Lilia

  • mhouston
    mhouston Contributor

    @LiliRestrepo adding the target="_blank" argument in the HTML code should do this for you.


    It would look like this:

    CONCAT('<div><a href="', 'https://yourinstance.domo.com/datasources/', `Dataset ID`, '/details/overview', '"', '"target="_blank">', `Name`, '</a></div>')

    ^^This is one I use in our instance to provide a clickable link on dataset names.

  • @mhouston that worked! thank you so much!!!

  • I could generate the link, but still when I click that link, the webpage is not opening... Its working as Interaction only... Please help

  • @Jigar_Thakkar What interaction settings to you have configured for that card in the dashboard?

  • Hi, MechelleH, Thanks for help, but I found the exact issue, the issue was that my link was not starting with "Https//" - I chnaged it and the issue was solved.


    Thanks a lot to community for great help. Let me share what all important points need to take care whole doing this.

    • The link in the column should start with "Https://"
    • In formula the "Link" is the field name of the column in which the links are there - CONCAT('<a href="', `Field name of the column`, '" target="_blank">', '</a>')