Skip to main content
Solved

Embed hyperlink in Formula Rich Text field

  • April 2, 2025
  • 0 replies
  • 275 views

Forum|alt.badge.img+4

Hi, 

I have a rich text formula field with an IF function to display specific text when a criteria is met. I want to add a link to a file in between the text output that opens on a different window. I need the display text to show as a hyperlink.

Example: If ([Platform] = "A", "Complete all tasks assigned for 'Priority Sites' once every 2 months", "No action necessary for this year")

Where 'Priority Sites' is the display text for the SharePoint web link https://sharepoint/prioritysites.pdf

From what I could find online, I guess I have to create a hyperlink field to store the web address but I'm not too sure how that works. Can someone provide a step by step guide on how to achieve the desired output?

Best answer by MarkShnierYou

The generic syntax for a Rich Text Hyperlink is this:

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

so if you had a URL type field to store the link you could do

var text Words = "PrioritySites";

var text URL = [My URL field];

var text Hyperlink = "<a href=" & $URL & ">" & $Words & "</a>";

If ([Platform] = "A", "Complete all tasks assigned for " & $Hyperlink & " once every 2 months", "No action necessary for this year")

MarkShnierYou
Forum|alt.badge.img+24

The generic syntax for a Rich Text Hyperlink is this:

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

so if you had a URL type field to store the link you could do

var text Words = "PrioritySites";

var text URL = [My URL field];

var text Hyperlink = "<a href=" & $URL & ">" & $Words & "</a>";

If ([Platform] = "A", "Complete all tasks assigned for " & $Hyperlink & " once every 2 months", "No action necessary for this year")