Display attachments column in Data View

Lately,  for me, it seems we have to come up with creative solutions around SharePoint constraints. Recently, I found a quick way to display the attachments column of list in a Data View:

<xsl:attribute name=”runat”>server</xsl:attribute>
           <xsl:attribute name=”ListId”>{0C830E35-11C8-4846-BDFF-A62A8CE0EF8B}</xsl:attribute>
           <xsl:attribute name=”FieldName”>Attachments</xsl:attribute>
           <xsl:attribute name=”ControlMode”>Display</xsl:attribute>
           <xsl:attribute name=”Visible”>true</xsl:attribute>
           <xsl:attribute name=”ItemId”><xsl:value-of select=”@ID”/></xsl:attribute>
           </xsl:element>
The result is a clean Data View with all attachments for that list item shown. Quick trick to make sure attachments are displayed when you might need them.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s