{% set loopIndex = 0 %} {% for buchhaltung in buchhaltungs %} {% set delControl = true %} {% if 'Bestell-Nr' in buchhaltung.buchungstext %} {% set delControl = getBuchBestellDelControl(buchhaltung.buchungstext) %} {% endif %} {% if delControl is not null %} {% set loopIndex = loopIndex + 1 %}