Forum Discussion

LijaHarris's avatar
LijaHarris
Qrew Cadet
3 years ago

Inserting hyperlink URL href field and referencing in Rich Text HTML field

I am trying to no avail to insert a URL formula field ("https://www.google.com/") for argument sake into a rich text field where I have a table created with HTML.  Some of the code is below per the picture attached:

\n<tr><td SPAN STYLE=\"color: black; font-size: 12pt; font-weight: bold; background-color: lightblue\">"&"B"&"</td>\n
 \n<td SPAN STYLE=\"color: black; font-size: 12pt; font-weight: bold\">"&"Front of Building"&"</td>\n
 \n<td SPAN STYLE=\"color: black; font-size: 8pt\">"&[test_url_field]&"</td>\n

I would like the link to be clickable and a hyperlink instead of a text link for the test_url_field.  Is this possible?  I have tried the following:

1) To Text (creating a to text formula field that converts test_url_field to a text)
2)Declaring a Variable
                        var text URL="https://" &[test_url_field];
         a. also tried var text URA="<a href='"&[test_url_field]&"'</a>";

2) Creating line of code no variable:
"<a href="URLRoot() & "db/" & Dbid() & "?a=er&rid=" & [test_url_field]& "</a>"</td></td>\n

Any help would be appreciated so much


------------------------------
Lija Harris
------------------------------

1 Reply

  • The image you attached isn't displaying for me, but the following code produces this result:

    var text url = "<a href=' " & [test url] & " '> link text</a>";  //test url is a formula url field containing "https://www.google.com/"

    "<div><span><table style='border:1px solid #aaa; border-collapse: collapse; background-color:#eee;table-layout:fixed; width:100px; '><thead></thead><tbody>" &
    "<tr><td style='color: black; font-size: 8pt;'>URL: </td><td style='color: black; font-size: 8pt;'>" & $url & "</td></tr></tbody></table></div>"

    ------------------------------
    Ahuva Brown
    ------------------------------