Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Thomas 66 posts 88 karma points
    Nov 25, 2011 @ 15:05
    Thomas
    0

    List records with specific value

    Hi I'm new with Xpath, so need a little help

    I'm trying to get and count Contour records in a specific form submitted by specific members.

        <xsl:variable name="recCountList" select="umbraco.contour:GetRecordsFromForm('b41befb1-549f-410a-babb-898a77f63759')[/uformrecord/memberkey=$profileMemberID]" />
        Comments: <xsl:value-of select="count($recCountList/uformrecord)" />

    Without the filter the recCountList returns all records from the form, with the filter it returns none.

    How do I make the filter work?

  • Thomas 66 posts 88 karma points
    Nov 25, 2011 @ 15:28
    Thomas
    0

    Ok, changed to this and it works

        <xsl:variable name="records" select="umbraco.contour:GetRecordsFromForm('b41befb1-549f-410a-babb-898a77f63759')" />
        <xsl:variable name="recCountList" select="$records/uformrecord[memberkey=$profileMemberID]" />
        <xsl:value-of select="count($recCountList)" /> comments

    I am though a bit concerned with performance, if I count comments from many members. Or is there no reason to worry about the difference?

Please Sign in or register to post replies

Write your reply to:

Draft