Advanced Row Formatting - RowDelimiter

Release 1.2 - ...

Advanced Row Formatting - RowDelimiter

This example shows how the rowdelimiter is placed between the rows outputted by the rowformat parameter. When no match or expression attribute is specified on the rowdelimiter element, the rowdelimiter is placed between each row, even when you are using the GroupFormat. Because this does not always give you the desired result, the rowdelimiter has the extra option "autodetect" for the attribute "match" as shown in this example. When the "match" is set to "autodetect", the rowdelimiter will not show up between rows that are separated by a groupformat.

Smartsite SXML CopyCode image Copy Code
<se:xmldatatable>
    <se:parameters>
        <se:parameter name="xml">
            <se:row><se:col name="Car">Audi</se:col><se:col name="Model">A3</se:col></se:row>
            <se:row><se:col>Audi</se:col><se:col>A4</se:col></se:row>
            <se:row><se:col>Toyota</se:col><se:col>Auris</se:col></se:row>
            <se:row><se:col>Toyota</se:col><se:col>Prius</se:col></se:row>
        </se:parameter>
        <se:parameter name="format">
 
            <se:groupformat groupby="this.field(Car)" trim="both">
                <li>
                    {this.group()} {this.groupresult()} 
                </li>
            </se:groupformat>
            
            <se:rowformat trim="both">
                {this.field(Model)}
            </se:rowformat>
            
            <se:rowdelimiter match="autodetect">, </se:rowdelimiter>
 
        </se:parameter>
        <se:parameter name="resultformat" trim="both">
            Popular lease cars are 
            <ul>
                {this.result()}
            </ul>
        </se:parameter>
    </se:parameters>
</se:xmldatatable>