For loop: accounts do not appear

Hi @fbeirens,

The reason for this, is because you database variable custom.detail.financiële_opbrengsten is actually empty.
This is explained here how to work around it, and why it’s empty:

Now, you could use the solution above (assign the default range into a new variable), but you could use the method accounts_var instead:

{% input custom.detail.financiële_opbrengsten as:account_collection range:global_7_range default:'75' accounts_var:fin_opbrengsten %} 

What this does, is actually fill the accounts_var (which is sort of a custom collection that can gather all accounts of a certain range you select, or a default range) with all the accounts. That accounts_var is called fin_opbrengsten f.i. and you can loop over this collection to display all the selected accounts (whether or not a default range was used or not):

{% for acc in fin_opbrengsten %}
{{ acc.value }} {{ acc.name }}
{% endfor %}

or even display the end-value of that collection with the attribute value: {{ fin_opbrengsten.value }}

I hope this clarifies it for you? If not, (or it does), let us know please!