HTML link to External site Using Values in Table

Aloha All:

 

I am trying to create a hyperlink from the values in a html table.

 

This is what I have so far:

 

CONCAT('<a href= https://www.research.net/r/',`column header name`,'_',`column header name1`,'_',`column header name2`,'?c='`column header name4`,'&PFC='`column header name5`,','`column header name6`,'&PCN='`column header name7`,'target = new> name of link on card </a>')

 

However, I have a syntax error but can't seem to find it.

 

Any suggestions?  I know I am missing something?  Does anyone know if there is a limit on the amount of columns that can be concat for a hyperlink.

 

Any assistance would be greatly appreciated.

 

SPM

 

 

 

 

Best Answers

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    Hi @Hulachic5 

    You're missing a few commas. Try this:

    CONCAT('<a href= https://www.research.net/r/',`column header name`,'_',`column header name1`,'_',`column header name2`,'?c=',`column header name4`,'&PFC=',`column header name5`,',',`column header name6`,'&PCN=',`column header name7`,'target = new> name of link on card </a>')
    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • GrantSmith
    GrantSmith Coach
    Answer ✓

    Your link should be enclosed in double quotes and the target needs a space before it

     

    try this. 

    CONCAT('<a href="https://www.research.net/r/',`Survey Collector - Current`,'?c=',`Ops Sup Region`,'&PFC=',`PFC Name - Survey Link`,'&PCN=',`PCN`,'" target="new"> Activity Link </a>')

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • Hulachic5
    Hulachic5 Member
    Answer ✓

    @GrantSmith 

     

    I was able to figure it out.

     

    For the URL information only  my beast mode is:

    CONCAT('base url',`column header1`,'some text',`column header2`,'some text',`column header3`,'some text',`column header4`)

     

    I couldn't have done it without your assistance.

     

    Thanks again.

Answers

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    Hi @Hulachic5 

    You're missing a few commas. Try this:

    CONCAT('<a href= https://www.research.net/r/',`column header name`,'_',`column header name1`,'_',`column header name2`,'?c=',`column header name4`,'&PFC=',`column header name5`,',',`column header name6`,'&PCN=',`column header name7`,'target = new> name of link on card </a>')
    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • Thanks @GrantSmith.  That worked like a charm.

     

    A follow on question -- I get the following results:

     

     - no hyperlink, but displays everything between the parenthesis (Example below)
    <a href= https://www.research.net/r/Ansbach_GE_USA?c=3&PFC=B.Vallejo&PCN=RAAAnGEatarget = new> Activity Link </a>

    [However, the orange font above is the actual hyperlink that I am trying to create in the beast mode. It should read "Activity Link", but it doesn't.]

     

    My Beast Mode is:
    CONCAT('<a href= https://www.research.net/r/',`Survey Collector - Current`,'?c=',`Ops Sup Region`,'&PFC=',`PFC Name - Survey Link`,'&PCN=',`PCN`,'target = new> Activity Link </a>')

     

    Any thoughts?

    Do you know if spaces in the column values plays a part? (i.e. Survey Collector - Current = Mount Rushmore, etc.)

     

     

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    Your link should be enclosed in double quotes and the target needs a space before it

     

    try this. 

    CONCAT('<a href="https://www.research.net/r/',`Survey Collector - Current`,'?c=',`Ops Sup Region`,'&PFC=',`PFC Name - Survey Link`,'&PCN=',`PCN`,'" target="new"> Activity Link </a>')

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • @GrantSmith  - You are a true LIFESAVER.  Worked like a charm.

     

    How can I show the entire URL without it being hyperlinked? I would like to have it in the next column...as a QC in case, the link doesn't work.

     

    Do I use the same beast mode, just remove the "https://"?

     

    Truly appreciate your assistance.

     

     

  • Hulachic5
    Hulachic5 Member
    Answer ✓

    @GrantSmith 

     

    I was able to figure it out.

     

    For the URL information only  my beast mode is:

    CONCAT('base url',`column header1`,'some text',`column header2`,'some text',`column header3`,'some text',`column header4`)

     

    I couldn't have done it without your assistance.

     

    Thanks again.