​One-to-Many Condition

This document explains one-to-many scenario conditions for table rows and the required XSLT output format.

Use this condition type only for tables inside a document. It must return true or false for each table row in this format:

<result>
  <rows>
    <row index='0'>true<row>
    <row index='1'>false<row>
    <row index='2'>false<row>
    <row index='3'>true<row>
  </rows>
</result>

The index attribute must match the index attribute in the fieldset node.

Example condition XSLT:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
        <result>
            <rows>
                <xsl:for-each select="envelope/documents/document[@id='document_id']/fieldgroup[@name='table_name']/fieldset">
                    <row index="{@index}">
                        <xsl:choose>
                            <xsl:when test="field[@name='field_name']='Yes'">
                              true
                            </xsl:when>
                            <xsl:otherwise>
                                false
                            </xsl:otherwise>
                        </xsl:choose>
                    </row>
                </xsl:for-each>
            </rows>
        </result>
    </xsl:template>
</xsl:stylesheet>

For each row where the result is true, the system creates a new envelope. To pass the row index into the XSLT mapping, add this parameter:

Use it like this:

Last updated