Yesterday I updated the download and source code for the Advanced Computed Field at the Ventigrate Public Code Repository with an XSL stylesheet. This was needed to fix an issue with the field not rendering values when filtered through a Web Part Connection.
The Advanced Computed Field relies on CAML to have the most flexibility of formatting, since SharePoint 2010 introduces XSL based Fields I updated it with the CAMLRendering=”TRUE” flag. This seemed to work for everything except an issue reported by Federico Sanchez regarding Connected Web Parts.
Federico came with the solution to the problem by adding the XSL stylesheet (nothing else needed to be changed), so it really is a nice solution.
xml version="1.0" encoding="utf-8" ?> <xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal"> <xsl:template match="FieldRef[@FieldType='AdvancedComputedField']" mode="Computed_body"> <xsl:param name="thisNode" select="."/> <xsl:value-of select="ddwrt:HtmlDecode($thisNode/@*[name()=current()/@Name])" disable-output-escaping="yes"/> xsl:template> xsl:stylesheet>
Solution upgrade
If you’re using the Advanced Computed Field in SharePoint 2010, it is advised to update the Solution Package (WSP) to the latest version (available in the download). It won’t break the existing use.
Download: link