7

I'm using SharePoint online and I've followed this solution URL in calculated column to create an hyperlink in a calculated column.

This is the formula I'm using:

="<a target='_blank' href='https://mysharepoint.sharepoint.com/site/documents/Forms/AllItems.aspx?FilterField1=MyField&FilterValue1="
 &[Name]
 &"'>See Data</a>"

I've also set the calculated column as Number.

But this is the result in my list:

enter image description here

Are solutions suggested in that post still working?

== UPDATE June 27, 2017 ==

Microsoft has disabled this functionality on June 13, 2017.

You can find other informations looking at this post: June 13th 2017 Microsoft blocked handling HTML markup in SharePoint calculated fields - how to get the same functionality back

1

3 Answers 3

5
="<a target=_blank "      
&"href=""https://mysharepoint.sharepoint.com/site/documents/Forms/AllItems.aspx"
&"?FilterField1=MyField"
&"&FilterValue1="
&[Name]
&""">See Data</a>"

Explanation: Make dynamic calculated column Formula URL open as modal

5
  • I used your formula, but SP still does not convert text to hyperlink
    – Pepozzo
    Mar 29, 2017 at 10:15
  • As documented this (unsupported) Microsoft trick only works for non-Text Fields; and only in Classic SharePoint, are you trying this on a Modern Experience? Include a screenshot of your output to you question Mar 29, 2017 at 10:24
  • Sorry, I forgot to set to classic SharePoint and not the modern. Now it works!
    – Pepozzo
    Mar 29, 2017 at 10:46
  • 1
    Do you know if something has changed on SharePoint Online? Your formula is not working anymore and I see not rendered HTML.
    – Pepozzo
    Jun 26, 2017 at 15:52
  • 3
    Yes, F!$!# Microsoft disabled everything on june 13 th.. search for their statement, there is also a Q/A here on SO with all details Jun 27, 2017 at 8:08
2

your formula it's ok, under the Formula Box you need to change "The data type returned from this formula" as number by default is marked as "single line text"

0
2

Format the column using JSON to create a link

https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting#create-clickable-actions

1
  • This is a great tip for SharePoint in Microsoft 365. Used it today!
    – Tom Resing
    Jul 15, 2020 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.