If you want to count how many elements a certain drop has, you can add .count
to your drop-name or the name of a collection :
{{ period.directors.count }}
Above code will result in the amount of directors have been checked in the period.people
drop.
Same goes for an accounts_var :
{% input custom.some.thing as:account_collection range:6,7 accounts_var:accounts %}
{{ accounts.count }}
{{ accounts.count }}
will display the amount of selected accounts in your custom collection (drop).
There are some variables however, that use .size
to count the amount. For instance :
{{ period.calendar_years.size }}
will give the amount of calendar years a period has.
The difference when to use .count
or .size
.count
can only be used in a drop or custom collection while the .size
only for a variable (like period.calendar_years.size
which is generated from the period-drop but not a drop itself).
Perhaps confusing, but worth to mention it in this case!