Loop for #accountCodes

Hello,

Is there any way to loop an accounts codes’ range, ex:
I’d like to sort #101 to #109, if it’s positive, it goes in {{ 0$ }} ; if it’s negative, it goes in {{ 1$ }}.

Thanks in advance !

Hi Axel,

If I understand your question correctly, I think you’re looking for something like this:

{% for account in #101__109 %}
{% if account.value > 0 %}
  {% $0+ account.value %}
{% else %}
  {% $1+ account.value %}
{% endfor %}

In the end you should have all positive values in $0 and all negative values in $1