Jun 13 2017 11:10 PM
A couple of months back I created a calculated column that was showing a hyperlink and I have just noticed that the calculation no longer works.
The formula I used is below, note: I have removed all the site name details.
="<a href='site_url_here/SitePages/DesignReview.aspx?Q1="&Title&"'>"&Title&"</a>"
I used a calculated column and set the data returned from the formula to Number.
Previously, it would show the Title column as a hyperlink to page that had a query parameter applied. Now it shows as below (again url removed):
<a href='/site_url_here/SitePages/DesignReview.aspx?Q1=Non-DPK related'>Non-DPK related</a>
Has anything change recently in SharePoint Online that is causing this to occur?
Jun 13 2017 11:46 PM
Yes, unfortunatelly MS has done it again: https://support.microsoft.com/en-us/help/4032106/handling-html-markup-in-sharepoint-calculated-field...
The change has rolled out the same day the news about it was published :(
Although there should be a possibility to request an extension through September 10, 2017. I have no ide how to request it... :D
Jun 14 2017 02:07 AM
Here also a load of sites broken without any communication up front, hopefully Microsoft is going to roll-back this change.
Jun 14 2017 03:23 AM
I personally do not think that this change will be rolled back. I turned to MS support and asked for extension to keep using html in calculated columns. They reponded by phone in an hour and it was really surprising :)
But I'm still waiting (4-5h) for the roll-back :D
Jun 14 2017 04:04 AM
Jupp, this is totally frustrating. We are using calculated columns to buil useful links and now they are broken.
I find it strange that MS did this change so fast with minimal warning. I would guess a lot of people use custom markup in calculated fields.
So what if it's not supported, it is highly used so insted of blocking it, they should work on a cool solution to replace it and suprise us insted :)
Jun 14 2017 05:41 AM
This is crazy. I'll have to create JS link templates for a whole bunch of lists if they don't rollback. Are Microsoft going to pay me for this? wtf
Jun 14 2017 06:39 AM
Jun 14 2017 11:37 PM
Still no response to our support call while this is a blocking issue for us, many of our sites are broken. No idea what they are thinking.
Jun 15 2017 05:31 AM
We are also facing the same issue.The formula column is displaying plaintext value instead of hyperlink HTML. This was working till tuesday but from yesterday it has suddenly changed. We are working on Office 365 Sharepoint online site. Does any updates implemented by microsoft?
Jun 15 2017 06:01 AM
Using js-link to fix the problem. No need to change the calculated field. Here's what I came up with:
Jun 15 2017 10:24 AM
Please see our update at https://techcommunity.microsoft.com/t5/SharePoint/Custom-markup-in-SharePoint-calculated-columns/m-p...
Thanks.
Jun 16 2017 02:10 AM
You can use following code in JS Link to fix this issue:
(function () {
var priorityFiledContext = {};
priorityFiledContext.Templates = {};
priorityFiledContext.Templates.Fields = {
'URL': { 'View' : setURL},
};
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(priorityFiledContext);
})();
function setURL(ctx){
var ret="";
if(ctx.CurrentItem["URL"] != "")
{
ret = "<a href=\""+ctx.CurrentItem["URL"]+"\" target=\"_blank\" class=\"lnkURL\">"+ctx.CurrentItem["Title"]+"</a>";
}
return ret;
}
Jun 18 2017 03:58 PM
thank you Vishal! I managed to get this one working.
Aug 16 2017 07:06 AM
Here is the official fix, at least for on-premise:
# NOTE: =$False NOT ="$False" # In SharePoint 2016 Management Shell, run... $Web = Get-SPWebApplication http://weburl $Val=$Web.CustomMarkupInCalculatedFieldDisabled=$False $web.update() # To confirm it is now false... $Web.CustomMarkupInCalculatedFieldDisabled
Feb 07 2018 11:09 PM
I love OnPremise! There are so many configurations where I need Powershell, and here *tada* another good example. Thank you very much. This Option Needs to be set to false (CustomMarkupInCalculatedFieldDisabled) now the Hyperlink calculated columns work perfectly again (with datatype number).
I used the following script:
cls
Add-PSSnapin Microsoft.SharePoint.Powershell
$Web = Get-SPWebApplication https://intranet... #Your Intranet URL
$Web.CustomMarkupInCalculatedFieldDisabled=$False
$web.update()
Jul 04 2019 08:48 AM
@Kelly Dungate with SharePoint online or SharePoint 2019 is not needed because you can format a column as following:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "a",
"txtContent": "@currentField",
"attributes": {
"target": "_blank",
"href": "=@currentField"
}
}