Copied to clipboard

Flag this post as spam?

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


  • Lasya 38 posts 70 karma points
    Jan 27, 2014 @ 15:56
    Lasya
    0

    adding new field to existing form

    I have added new field behalfofagroupofpeoplehowmany(textfield) to an existing form.

    And i need to extract that field values with xslt.

    <xsl:variable name="records"  select="umbraco.contour:GetRecordsFromForm('a22856dc-9d87-44f5-a3dd-27c32cae57d9')//uformrecord[state='Approved']"/>
       
        <xsl:variable name="notNullRecords" select="sum($records/fields/behalfofagroupofpeoplehowmany/values[value != '']//value)" />
        <xsl:variable name="nullRecords" select="count($records/fields/behalfofagroupofpeoplehowmany/values[value = '']//value)" />
        Supporters <strong><xsl:value-of select="$notNullRecords + $nullRecords" /></strong>

     

    • This is not producing old records(1151)(submitted records when new field is not there in the form).
    • It is producing old records only when i open the record in edit the values under contour.
    • I need to count old records with field value as null with xslt.

    Any help please...

    Thanks,

    Lasya.

     

  • Comment author was deleted

    Jan 27, 2014 @ 16:00

    yeah guess it's do to the xslt

    Old records won't have the behalfofagroupofpeoplehowmany element so check on that instead of the value

  • Lasya 38 posts 70 karma points
    Jan 27, 2014 @ 16:17
    Lasya
    0

    Can we check on the field instead of value like this

    <xsl:variable name="nullRecords" select="count($records/fields[behalfofagroupofpeoplehowmany = ''])" />

    I have edited field name(which contains values) in the form and i have the same problem to display sum of records field values.

    Producing 0 instead of 140.

  • Lasya 38 posts 70 karma points
    Jan 27, 2014 @ 16:22
    Lasya
    0

    Working with <xsl:variable name="nullRecords" select="count($records/fields[behalfofagroupofpeoplehowmany])" />

     

  • Comment author was deleted

    Jan 27, 2014 @ 16:23

    Yup that should do the trick

  • Lasya 38 posts 70 karma points
    Jan 27, 2014 @ 17:07
    Lasya
    0

    Sorry !

    Still not working with <xsl:variable name="nullRecords" select="count($records/fields[behalfofagroupofpeoplehowmany])" />

Please Sign in or register to post replies

Write your reply to:

Draft