[!-- Another example with loops and calculations --]
[EFTL][HEADER name="trimDocument" value="true" type="boolean" /]
[VAR name="IDX_NOME" type="number"][% IDX_NOME = 0; %][/VAR]
[VAR name="IDX_SEDE" type="number"][% IDX_SEDE = 2; %][/VAR]
[VAR name="ELENCO" type="string"][% ELENCO = ""; %][/VAR]

[VAR name="IDX" type="number"][% IDX = 0; %][/VAR]
[VAR name="CONTRAENTI" type="iterable"][SPLIT regex="\n"][TRIM][TAG]SCHEMAID,296,COL0004,IUQOID, , [/TAG][/TRIM][/SPLIT][/VAR]
[VAR name="CONTRAENTI_NUM" type="number"][SIZE_OF varname="CONTRAENTI" /][/VAR]

[WHILE threshold="99"]
    [CONDITION][% IDX < CONTRAENTI_NUM %][/CONDITION]
    [DO]
        [VAR name="CONTRAENTE" type="string"][VALUE_OF varname="CONTRAENTI" index="IDX" /][/VAR]
        [VAR name="DATI" type="iterable"][SPLIT regex=" - "][TRIM][% CONTRAENTE %][/TRIM][/SPLIT][/VAR]
        [VAR name="NOME" type="string"][VALUE_OF varname="DATI" index="IDX_NOME" /][/VAR]
        [VAR name="SEDE" type="string"][VALUE_OF varname="DATI" index="IDX_SEDE" /][/VAR]
        [% ELENCO = ELENCO + NOME + " (" + SEDE + "); "; %]
        [% IDX = IDX + 1; %]
    [/DO]
[/WHILE]

[FORMAT type="number" pattern="#,##0.00"][% 12345.67 %][/FORMAT]

[%= ELENCO %]
[/EFTL]
