Account values in multiple reconciliations

Dear,

We have in one reconciliation the option to drag and drop accounts (the code below).

{% assign accounts_a = period.accounts | range: custom.accounts.a %}
{% input custom.accounts.a as:account_collection range:0,6,7 %}

|:-4%--|:-42%-------|--15%---:|:-8%---:|--15%--:|--12%---:|-4%--:+{%for account in accounts_a %}
{% stripnewlines %}
|
|{% ic %}  {% endic %}{{ account.link }}
|{%=$1+ account.value %}

Once the user has made a selection of certain accounts I want to display (without capture) the same selection of accounts in another template. I have tried the code below in the second template but it doesn’t work.

{%for account in accounts_a %}
|----------------
|{{ account.link }}
|{{ account.value }}{% endfor %}

Could anyone please help me with this matter?

Thanks!

Hi Marnix,

You can refer to specific selections in variables by using the following reconciliation in the other template:

period.reconciliation.handle.custom.accounts.a

The ‘handle’ within this variable, depends on the handle you’ve set for your template.
These handles can be managed/assigned within your templates:

Does this help you further?

Hi Jelle,

Your below code doesn’t work.

Is it possible to take a look into my code to see what solution should work?

Kind regards,

Marnix

Hi Marnix,

I seem to have missed the ‘s’ in reconciliation above, the correct naming convention is:

period.reconciliations.handle.custom.accounts.a

I’ve made a similar case in my own environment, and adjusted both scripts a bit:

{% assign accounts_a = period.accounts | range: custom.accounts.a %}
{% input custom.accounts.a as:account_collection range:0,6,7 %}


{%for account in accounts_a %}
|:-4%--|:-42%-------|--15%---:|:-8%---:|--15%--:|--12%---:|-4%--:+
||{% ic %}  {% endic %}{{ account.link }}|{%=$1+ account.value %}

{%endfor%}

You can then use the following script to fetch the selected accounts, in which you use the reconciliation to define your range:

{% assign accounts = period.accounts | range:period.reconciliations.marnix_test.custom.accounts.a %}
{%for account in accounts %}

|-------40%-------|------:+
|{{ account.link }}|{{ account.value }}
{% endfor %}

Does this work for you?

Yes it works.

Thanks a lot!