theme-sticky-logo-alt

You cannot add HTML to Calculated fields in SharePoint Online Starting Today

6 Comments

Microsoft just published a new support article stating that you cannot use calculated fields to display HTML anymore. I know a lot of people were using this to for example show KPIs, or do some conditional formatting. This change was announced on June 13th 2017 and taking effect as of June 13th 2017 , so not giving companies a lot of time before things start breaking … however an Administrator can open a support ticket and extend this functionality until September 10th , when this will completely stop working.

For SharePoint On-Premises, Microsoft will include a new Web-Application level setting in SharePoint 2013/2016 starting in the July 2017 PU which will allow you to either enable or block this feature at the Web Application level. Here is the full announcement:

Calculated Fields

In Microsoft SharePoint lists and libraries, calculated fields that are running in the classic UI mode can be used to display results based on Excel-like formulas. This is a long standing capability, and is documented in Calculate data in lists or libraries.

Some users have added HTML markup or script elements to calculated fields. This is an undocumented use of the feature, and we will begin blocking execution of custom markup in calculated fields in SharePoint Online from June 13, 2017 onwards. We are also providing this as a configurable option for on-premises in SharePoint Server 2016 and SharePoint Server 2013 via the June 2017 and subsequent Public Updates.

More Information

SharePoint Online

We are changing calculated fields to escape special characters. In some circumstances, this mean that calculated fields that contain any unsupported markup will not display any value. Instead, they’ll be blank in the list view.

This change will take effect on June 13, 2017. Administrators can request an extension through September 10, 2017 at the latest. During this time, special characters will not be escaped in calculated fields. This request can be submitted through Microsoft Support. However, beginning September 10, 2017, all unsupported markup will be ignored.

SharePoint Server 2013 and SharePoint Server 2016

The June 2017 Public Update (PU), and subsequent PUs will include a new web application setting that’s called CustomMarkupInCalculatedFieldDisabled. This setting will enable an on-premises administrator to configure whether or not calculated fields in a given web application will escape special characters.

Here’s the default behavior for existing and new web applications at the time of the update installation.

Web app typeDefault setting
Newly created web app after the update is installedEscape special characters in calculated fields
Existing web app after the update is installedDon’t escape special characters in calculated fields

You can also view it on Microsoft Support Here: Handling HTML markup in SharePoint calculated fields. Does this change affect you or your users? How do you plan to go around it for those different needs? Will you be requesting an extension until September 10th?

Share the info the comments so we can all help each other and make sure to share this on Social Media so your colleagues will also be aware of the change!

Follow me on Social Media and Share this article with your friends!

Leave a comment and don’t forget to like the Absolute SharePoint Blog Page   on Facebook and to follow me on Twitter here  for the latest news and technical articles on SharePoint.  I am also a Pluralsight author, and you can view all the courses I created on my author page.
Previous Post
The Ultimate Script to download Microsoft Build 2017 Videos AND slides!
Next Post
Get a Free Visa Gift Card when you sign up for Pluralsight before end of June

6 Comments

  • June 14, 2017 at 12:26 pm
    Idaho Edokpayi

    On reflection this looks like a security consideration and while I feel for the people whose modifications have just been invalidated, I do understand why this would need to be done.

    Reply
  • June 14, 2017 at 1:20 pm
  • June 14, 2017 at 5:40 pm
    John

    What has been really fun (aside from no advanced notice of this change) is creating a ticket to extend to Sept 10th, and Microsoft Support not knowing how to implement the extension 🙂

    Reply
  • June 20, 2017 at 6:21 am
    Parikshit Kulkarni

    Is there any specific reason mentioned for this change?this was one useful feature to avoid customization.

    Reply
  • June 22, 2017 at 7:32 am
    Brad

    I think this was a security flaw, which could have caused an XSS, but not confirmed. GTconsult A-Team figured out a workaround https://www.gtconsult.com/handling-html-markup-sharepoint-calculated-fields-workaround/

    Reply
  • June 27, 2017 at 2:58 pm
    Darlene

    This is a major deal breaker for my organization to be able to migrate from on-premise to cloud. We use this as a feature extensively to automate the creation of links for parent child relationships. Example: I have a list called Change Request with a calculated field that contains the formula to contain a link called Create Task with a querystring containing the key field information so that when clicked the user is able to create a task that is automatically linked to the Change Request. There are multiple places we use this type of parent child relationships and there is no way easy automated way to create this using a hyperlink field without having to include it in a workflow to update the field after item creation. If we had the ability to use a Post Save Action in client scripting I could do it because Pre-Save Action won’t work since the item is not yet created. This is terrible.

    Reply

Leave a Reply

15 49.0138 8.38624 1 0 4000 1 https://vladtalkstech.com 300 1