Circular Reference

I have 2 templates that refer to each other and are creating a circular reference. I’m trying to find a way to bypass using “result”.

The Template A is a recon template which calculates a total from the underlying account templates. Currently the total of these amounts is assigned to a register:

|{%=$1+ account.value | currency %}
|{%=$3+ account.value-account.results.amount_1%}
|{%=$4+ account.results.amount_2%}

The totals are then added to a result:

{% result ‘total_item_1’ $3 %}
{% result ‘total_item_2’ $4 %}

Template B then populates the results from Template A into a table.

  {{-period.reconciliations.template_A.results.total_item_1|currency }}
  {{-period.reconciliations.template_A.results.total_item_2|currency }}

The Total of the table in Template B is then added to a result and that total is used for a separate calculation in Template A:


So because the total in template B is using amounts from template A, I cannot get the total from template B back into template A.

Is there any way around this?

I haven’t used the Account templates myself yet.

But I am wondering if you could just do the three calcs below in Template B (as well as Template A still. Just won’t be needing to use the result tags). Since they all come from an account template. Instead of bringing the total in as a result from Template A —> Template B, you just do these same calcs in Template B.

|{%=$1+ account.value | currency %}
|{%=$3+ account.value-account.results.amount_1%}
|{%=$4+ account.results.amount_2%}

If this is possible - then you should still be able to get the total of the table in Template B w/o using any result tags from Template A. And you can then just bring the total table result tag from Template B → into Template A.


That worked perfectly. Thank you :slight_smile:

1 Like