Adding Hyperlinks to a Formula Text (or Rich Text) Field

  • 1
  • 1
  • Question
  • Updated 11 months ago
  • Answered
I have a field where I am trying to allow for simple IF formula to show either an Individual's Name or an Organization's Names depending on if they have selected a record from the Individuals Table or the Organizations Table. 

If formula is easy 

If([Related Individual]=null,[Organization Name],[Individual - Full Name])

However by doing this the records no longer link to their original record in their specific tables. I would imagine the solution is to make a Rich Text Formula field and some sort of HTML. Anyone have it handy or can problem solve it? It seems like it should be some sort of hyperlink HTML to go with that simple IF formula and it should work but i tried doing an <a href=""> formula and it didn't work for me.
Photo of Michael Bralow

Michael Bralow

  • 204 Points 100 badge 2x thumb

Posted 11 months ago

  • 1
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,612 Points 50k badge 2x thumb
When I make Hyperlinks I always make them the same way, no matter how simple or complex.

var text Words = If(
[Related Individual]=null,[Organization Name],
[Individual - Full Name]<>"", [Individual - Full Name]);

var text URL =
[Related Individual]>0, urlroot() & "db/" & [_DBID_OF_THE_INDIVIDUALS_TABLE] & "?a=dr&rid=" & [Related Individual],

[Related Organization]>0, urlroot() & "db/" & [_DBID_OF_THE_ORGANIZATION_TABLE] & "?a=dr&rid=" & [Related Organization]);

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

You will ned to obtain the correct table names from the advanced properties for the table.  It's down near the bottom.