AnsweredAssumed Answered

Nintex repeating section

Question asked by csrameneni on Nov 12, 2015
Latest reply on May 15, 2017 by cju@evolusys.ch

Hi Friends,

 

I'm using repeating section and this is the sample code generated

 

<?xml version="1.0" encoding="utf-8"?><RepeaterData><Version /><Items><Item><TypeofWork type="System.String">Follow Up</TypeofWork><TimeTaken type="System.Double">12</TimeTaken></Item><Item><TypeofWork type="System.String">Transferred</TypeofWork><TimeTaken type="System.Double">12</TimeTaken></Item><Item><TypeofWork type="System.String">Meeting</TypeofWork><TimeTaken type="System.Double">12</TimeTaken></Item><Item><TypeofWork type="System.String">Follow Up</TypeofWork><TimeTaken type="System.Double">12</TimeTaken></Item></Items></RepeaterData>

 

In the code, there are two rows of data that contains Follow up as the Type of work along with the Time Taken for each status

 

Is it possible(either using code or workflow) to gather/add/group the time taken information based on the Type of Work? For ex.: If the Type of work = Follow Up then the output should be 24.

 

This is the XSLT Code, I'm using

 

<?xml version="1.0"?>

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

        <!-- transform repeating section from xml to html -->

        <xsl:template match="/">

            <xsl:apply-templates />

        </xsl:template>

       

        <xsl:template match="Items">

             <table border="1" width="100%" style="border-collapse:collapse;background-color:#eee;border:1px solid;color:black;font-size:100%;font-family:arial,helvetica,sans-serif;">

                 <thead>

                     <tr>

                         <td>Type of Work</td>

                         <td>Time Taken</td>

                     </tr>

                 </thead>

                 <tbody>

                     <xsl:apply-templates />

                 </tbody>

             </table>

        </xsl:template>

       

        <xsl:template match="Item">

             <tr>

                 <!-- field output order -->

                 <xsl:apply-templates select="TypeofWork" />

                 <xsl:apply-templates select="TimeTaken" />

             </tr>

        </xsl:template>

       

                <xsl:template match="TypeofWork">

             <td>

                 <xsl:value-of select="." disable-output-escaping="yes"/> </td>

         </xsl:template>

  

         <xsl:template match="TimeTaken">

             <td>

                 <xsl:value-of select="." disable-output-escaping="yes"/> </td>

        </xsl:template>

       

</xsl:stylesheet>

Outcomes