Eliminating Duplicates in SharePoint XSLT Data Views or Drop-downs

I may want to create a custom dashboard enumerating all of the unique values from a column in a list.  In my example I have a list of possible releases of software where each has a Product column.  I want to build a menu of all of the Products from this list.

I give credit to this method to Marc Anderson at: http://sympmarc.com/2007/10/23/eliminating-duplicates-in-data-view-web-parts/


<xsl:templatename="dvt_1.rowview">
    <xsl:variablename="NewGroup"select="ddwrt:NameChanged(string(@Your_x0020_Column),0)"/>
    <xsl:iftest="string-length($NewGroup)">
          <xsl:value-ofselect="@Your_x0020_Column"/>
    </xsl:if>
</xsl:template>

Comments

Popular posts from this blog

SharePoint Designer 2013 Approval Workflow with Comments

Change SharePoint server hostname and Web Application Names

The Timer Service Failed to Recycle