Whenever we add a lookup column in the Data View, that column automatically gets linked to it’s master list. This is a good feature since it gives more information on demand without any coding. But there are no straight forward method to remove that hyperlink from the Data View. There are occasions where we need to remove that Hyperlinks.
We can do this by customizing the XSLT of the Data View. Open the Data View in SharePoint designer and change the <xsl:value /> of the lookup column with code given below.
1 |
<xsl:value-of select="substring-before(substring-after(@LookupColumnName, '>'), '<')" disable-output-escaping="yes"/> |
Change above code’s “LookupColumnName” with proper column name.
NOTE: Above code will not work if Multiple values is enabled in the lookup column.