MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

User level filter in Data View (showing one user name many times )

  Asked By: Bhupesh    Date: Sep 23    Category: MOSS    Views: 2675

Dear Friends,

i have created a Project list/task in Data View. i would like to give "Filter" option to users, so they can filter as per "Assigned To" Field.

in page, the code was:

<!-- Default Code Start from here-->
<xsl:attribute name="value">
<xsl:value-of select="ddwrt:ConnEncode(normalize-space($value))" />
<xsl:if test="$dvt_filterfield=$name and $dvt_filterval=normalize-space($value) and $dvt_filterval!=''">
<xsl:attribute name="selected">true</xsl:attribute>
<xsl:when test="string-length($output) > 40">
<xsl:value-of select="substring($output, 1, 40)" /> ...
<xsl:value-of select="$output" />

<!-- Default Code end here -->

i updated the like
<xsl:value-of select="substring($output, 1, 40)" /> ...
<xsl:value-of select="$output" disable-output-escaping="yes" />

now, its showing username in drop down menu of filter. but its showing multiple username (if any user has 3 task "Assigned To" then its showing that user name 3 times.)

i would like to have distinct the username just like another filter value.

please let me know the Solution,




1 Answer Found

Answer #1    Answered By: Bhupesh Karankar     Answered On: Sep 23

Dear All,

Thanks for your support, i (myself) identify this issue my.

update line as:
<xsl:for-each select="msxsl:node-set($dvt_Rows)/*[not(@*[name()=$dvt_FieldNameNoAtSign]=preceding-sibling::*[1]/@*[name()=$dvt_FieldNameNoAtSign])]/@*[name()=$dvt_FieldNameNoAtSign]">

Remove the [1], like this:

<xsl:for-each select="msxsl:node-set($dvt_Rows)/*[not(@*[name()=$dvt_FieldNameNoAtSign]=preceding-sibling::*/@*[name()=$dvt_FieldNameNoAtSign])]/@*[name()=$dvt_FieldNameNoAtSign]">

now, everything working fine.

let me know if someone required help at bkarankar@gmail.com

This post is locked for further answers.