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

Pepozzo
  • 1,073
  • 2
  • 15
  • 36
  • Please refer this once before trying anything. https://support.microsoft.com/en-us/help/4032106/handling-html-markup-in-sharepoint-calculated-fields – Chetan Kashid Aug 04 '17 at 10:45

3 Answers3

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

Danny '365CSI' Engelman
  • 21,176
  • 7
  • 35
  • 79
  • I used your formula, but SP still does not convert text to hyperlink – Pepozzo Mar 29 '17 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 – Danny '365CSI' Engelman Mar 29 '17 at 10:24
  • Sorry, I forgot to set to classic SharePoint and not the modern. Now it works! – Pepozzo Mar 29 '17 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 '17 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 – Danny '365CSI' Engelman Jun 27 '17 at 08: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"

Ximena C
  • 21
  • 1
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

Matt
  • 133
  • 5