Stump the Panel » Site Managers and Site Collection Managers

Distinct data view list

(4 posts)
  1. Alright here's the run down. I've got a list called Course Surveys that I have in a data sheet view. The only column in this list is a cilumn called Course. This column can contain duplicate items because more than 1 person can take a survey for a course. This is linked to another data view web part that shows the details of the responses.

    What i am trying to do is output the distinct values of that column but have been hitting a brick wall. Any pointers on how to do this? I've found a few references to use an xpath filter like <xsl:value-of select="not(@Title=preceding-sibling::Row/@Title)"></xsl:value-of>, but this either breaks the page or returns boolean true or false values and not the names.

    Seems short sided to have to hack the xsl in SPD to be able to get distinct values

    Posted 5 days ago #
  2. I used something like this one: http://stackoverflow.com/questions/153156/xslt-how-to-count-distinct-values-in-a-node/153969

    Let me know if you need more help!

    Posted 5 days ago #
  3. How can I see the generated XML so I can create the key structure?

    Posted 5 days ago #
  4. Nice question indeed!

    Here is the template for Data view web part, you will need to take a look at view source of your SharePoint page to see the actual source. In any case this is the best approach, copy list source XML to an XML file and prepare XSLT transformation out of SharePoint Designer it is much much faster approach.

    <xsl:output method="xml" indent="yes"/>

    <xsl:template match="@* | node()">
    <xsl:copy>
    <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
    </xsl:template>

    Posted 5 days ago #

RSS feed for this topic

Reply

You must log in to post.