CASE: use handles as ranges

You might not think of it, but did you know you can use handles the same way as account ranges, to filter on the reconciliations-drop to whatever you need?

As you know, the accounts drop can be filtered like this for example:

{% comment %}filter accounts{% endcomment %}
{% assign my_accounts = period.accounts["61,62,63,64"] %}

{% for acc in my_accounts %}
  {% linkto acc %}{{ acc.number }}{% endlinkto %}
{% endfor %}

Well, to filter the reconciliations drop on certain handles, you can do just the same:

{% comment %}
use handles of reconciliations as ranges 
{% endcomment %}
{% assign recon_ranges = "vkt_3_1,vkt_3_2,vkt_4,vkt_5" %}

{% comment %}create the needed reconciliations{% endcomment %}
{% assign aa_recons = period.reconciliations[recon_ranges] %}

{% comment %}show link to the recons{% endcomment %}
{% stripnewlines %}
{% for recon in aa_recons %}
  {% newline %}
  {% linkto recon %}{{ recon.name }}{% endlinkto %}
{% endfor %}
{% endstripnewlines %}

Obviously, this can work as well:

{% assign aa_recons = period.reconciliations | range:recon_ranges %}

We were wondering if this functionality is something you need? And if so, why exactly do you need to access certain reconciliation drops?

Let us known please :+1:

1 Like

I use something similar to filter all active recons in the current period to set up dynamic navigation.