# Link between different documents

**URL:** <https://community.silverfin.com/t/link-between-different-documents/97>\
**Category:** Templates\
**Tags:** shared\_parts, drop\_reconciliation\
**Created:** [March 2, 2017, 9:04am UTC](https://community.silverfin.com/t/link-between-different-documents/97 "2017-03-02T09:04:46Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fiduciaire.Eulaers](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/fiduciaire.eulaers/32/31_2.png) [@Fiduciaire.Eulaers](https://community.silverfin.com/u/Fiduciaire.Eulaers)\
**Post date:** [March 2, 2017, 9:04am UTC](https://community.silverfin.com/t/link-between-different-documents/97/1 "2017-03-02T09:04:46Z")

</div>

We created a few documents to enlarge our “winstberekeningen”. We would like to link the sum of one document to a different document. Do we need to “name” the sum we want to link? How do we need to do this?

For example, this is a document and we like to link the endresult to another document.

```auto

_ **Resultaatrekening per {{ period.year_end_date | date:'%d/%m/%Y' }}** _

**I. Bedrijfsopbrengsten**

{% if custom.detail.goederen == blank %}{% assign goederen_range = '60'%}{% else %}{% assign goederen_range = custom.detail.goederen %}{% endif %}
{% assign goederen = period.accounts | range:goederen_range %}

|---------------------|-------15%-------:+
| Omzet {% input custom.detail.omzet as:account_collection range:7 default:'7' accounts_var:omzet %} |_{%=$10+ -1*omzet.value | currency %}_
| Beginvoorraad {% input custom.detail.beginvoorraad as:account_collection range:6,7 accounts_var:beginvoorraad %}| {{ -1*beginvoorraad.value | currency}}
| Handelsgoederen {% input custom.detail.goederen as:account_collection range:6 default:'60' %} |{{ -1*goederen.value | currency}}
| Eindvoorraad {% input custom.detail.eindvoorraad as:account_collection range:6,7 accounts_var:eindvoorraad %}|{{ -1*eindvoorraad.value | currency}}
| Onderaanneming {% input custom.detail.onderaanneming as:account_collection range:6,7 accounts_var:onderaanneming %}|_{{ -1*onderaanneming.value | currency}}_
| Verkochte voorraad|_{%=$10+ -1*(beginvoorraad.value+goederen.value+eindvoorraad.value+onderaanneming.value) | currency %}_
| Nettoresultaat | **{{ $10-1 | currency }}**

```

Document where we need the endresult:

```auto

_ **RESULTAATREKENING PER {{ period.year_end_date | date:'%d/%m/%Y' }}** _

**KOSTEN**

{% if custom.detail.goederen == blank %}{% assign goederen_range = '60'%}{% else %}{% assign goederen_range = custom.detail.goederen %}{% endif %}
{% assign goederen = period.accounts | range:goederen_range %}

|---------------------|-------15%-------:+
| Afschrijvingen {% input custom.detail.afschrijvingen as:account_collection range:6 default:'63' accounts_var:afschrijvingen %} | {{ afschrijvingen.value| currency}}
| Diverse diensten {% input custom.detail.diversediensten as:account_collection range:6 default:'61' accounts_var:diversediensten %}| {{ diversediensten.value| currency}}
| Personeelskosten {% input custom.detail.personeelskosten as:account_collection range:6 default:'62' accounts_var:personeelskosten %}|{{ personeelskosten.value| currency}}
| Andere bedrijfskosten {% input custom.detail.andere as:account_collection range:6 default:'64' accounts_var:andere %}|{{ andere.value | currency}}
| Financiële kosten {% input custom.detail.financieel as:account_collection range:6 default:'65' accounts_var:financieel %}|{{ financieel.value | currency}}
| Sociale bijdrage {% input custom.detail.socialebijdrage as:account_collection range:6 default:'' accounts_var:socialebijdrage %}|_{{ socialebijdrage.value | currency}}_
| **Totaal kosten** | **{{ afschrijvingen.value+diversediensten.value+personeelskosten.value+andere.value+financieel.value+socialebijdrage.value | currency }}**
| Kosten weerhouden niet-bedrijfsmatig|{% assign account_range = custom.detail.nietbedrijfsmatig1 %}
| Kosten met fiscale aftrekbeperking {% input custom.detail.aftrekbeperking as:account_collection range:6 default:'64' accounts_var:aftrekbeperking %}|_{{ -1*aftrekbeperking.value | currency}}_
| **Totaal kosten** | **{{ afschrijvingen.value+diversediensten.value+personeelskosten.value+andere.value+financieel.value+socialebijdrage.value-bedrijfsmatig.value-aftrekbeperking.value | currency }}**
| **Nettowinst van het boekjaar** |_ **{{ opbrengsten-afschrijvingen.value+diversediensten.value+personeelskosten.value+andere.value+financieel.value+socialebijdrage.value-bedrijfsmatig.value-aftrekbeperking.value | currency }}** _
| Bedrijfsopbrengsten {% input custom.detail.opbrengsten as:account_collection range:7 default:'7' accounts_var:opbrengsten %}|{{ -1*opbrengsten.value | currency}}

```

---

<div class="post-metadata">

**Author:** ![Tim](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/tim/32/1304_2.png) [@Tim](https://community.silverfin.com/u/Tim)\
**Post date:** [March 2, 2017, 4:51pm UTC](https://community.silverfin.com/t/link-between-different-documents/97/2 "2017-03-02T16:51:11Z")

</div>

The documents you’re talking about, are these text documents, or reconciliations?

It’s currently not possible to expose results on text documents (it is possible to do it on reconciliations though, by using a handle)

---

<div class="post-metadata">

**Author:** ![Fiduciaire.Eulaers](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/fiduciaire.eulaers/32/31_2.png) [@Fiduciaire.Eulaers](https://community.silverfin.com/u/Fiduciaire.Eulaers)\
**Post date:** [March 3, 2017, 9:22am UTC](https://community.silverfin.com/t/link-between-different-documents/97/3 "2017-03-03T09:22:14Z")

</div>

They are text documents, like the reports in our companies.  
In our reports “verslag algemene verhadering” there is data our the report “Bedrijfsparameters” zo it’s possible, I think?  
We just need to know how we can use the result in one report, in another report.  
Do we need to “name” the result?  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Fiduciaire.Eulaers](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/fiduciaire.eulaers/32/31_2.png) [@Fiduciaire.Eulaers](https://community.silverfin.com/u/Fiduciaire.Eulaers)\
**Post date:** [March 8, 2017, 1:17pm UTC](https://community.silverfin.com/t/link-between-different-documents/97/4 "2017-03-08T13:17:55Z")

</div>

Little reminder 🙂

---

<div class="post-metadata">

**Author:** ![sven](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/sven/32/1495_2.png) [@sven](https://community.silverfin.com/u/sven)\
**Post date:** [October 18, 2017, 7:02am UTC](https://community.silverfin.com/t/link-between-different-documents/97/5 "2017-10-18T07:02:12Z")

</div>

Hi @Fiduciaire.Eulaers,

Just to be clear: you want to link something from text template A to text template B, right? Because that’s not possible for now…

But, the template where the results is defined… Perhaps it’s an option to have that as a reconciliation template instead of a text template? Such things can’t hurt to be in the working papers, I suppose, no?

If that is an option, let me know and I’ll guide you further.

---

<div class="post-metadata">

**Author:** ![lieels01](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@lieels01](https://community.silverfin.com/u/lieels01)\
**Post date:** [February 10, 2022, 10:13am UTC](https://community.silverfin.com/t/link-between-different-documents/97/6 "2022-02-10T10:13:21Z")

</div>

Hi!  
I’m having kind off the same question, but in another context.

I’d like to have the agenda from document A (based on different booleans the user selects) to be visible in document automatically B. If I understand this well, it’s not possible to have the results of the coding in doc A appear in doc B and I need to copy the entire code in document B as well instead of just a link between the docs?

---

<div class="post-metadata">

**Author:** ![t0gden](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/t0gden/32/1842_2.png) [@t0gden](https://community.silverfin.com/u/t0gden)\
**Post date:** [February 10, 2022, 1:27pm UTC](https://community.silverfin.com/t/link-between-different-documents/97/7 "2022-02-10T13:27:05Z")

</div>

Hi @lieels01,

I’m afraid that it is not possible to achieve this with documents, there is no handle to refer to and as such no way to link the documents to one another.

However, you would be able to achieve this by using reconciliation templates and result tags.

Is there a specific reason why you are opting to use documents over reconciliations?

Here is a link to the [Result tag](https://developer.silverfin.com/docs/result) section on our website.

Hopefully I have understood your query correctly but if not please supply some further information and I will take another look for you 🙂

Many thanks

Tom

---

<div class="post-metadata">

**Author:** ![lieels01](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@lieels01](https://community.silverfin.com/u/lieels01)\
**Post date:** [February 10, 2022, 4:16pm UTC](https://community.silverfin.com/t/link-between-different-documents/97/8 "2022-02-10T16:16:46Z")

</div>

Hi @t0gden

I think you understood well with exception that it’s not between documents, but indeed between the templates. We have some agenda points set up in reconciliation A that should be transferred to B and change as well depending on what the user filled in in A.

But is this is not possible, we of course can copy the entire code I guess 🙂

---

<div class="post-metadata">

**Author:** ![borjaGonzalez](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/borjagonzalez/32/825_2.png) [@borjaGonzalez](https://community.silverfin.com/u/borjaGonzalez)\
**Post date:** [February 11, 2022, 9:43am UTC](https://community.silverfin.com/t/link-between-different-documents/97/9 "2022-02-11T09:43:19Z")

</div>

Hi @lieels01,

To feed information from Template A to Template B you have 2 options:

**a) Access data stored in the database**

If the agenda points are set up as input fields, you can access them directly in Template B like this:

Let’s assume you have this on Template A:

```auto
{% input custom.agenda.points as:boolean %}

```

Then in Template B you can retrieve the data from that variable like this:

```auto
{{ period.reconciliations.template_b_handle.custom.agenda.points }}

```

You can also do this if you want to be able to edit the same variable in both templates:

```auto
{% assign agenda_points_boolean = period.reconciliations.template_b_handle.custom.agenda.points %}

{% input agenda_points_boolean as:boolean %}

```

**b) Use results to access data that is not stored in the database**

If the data you want to retrieve from Template A is a series of calculations that are not stored in the database, you can use the result tag to fetch the values like in the example below.

Let’s assume you have the following code in Template A:

```auto
{% assign tax_rate = 0.2 %}
{% input custom.current_year.revenue %}
{% assign total_tax = custom.current_year.revenue*0.2 %}
{% result 'total_tax' total_tax %}

```

Then in template B:

```auto
{{ period.reconciliations.template_b_handle.results.total_tax }}

```

To learn more about results, please take a look at the following [community case](https://community.silverfin.com/t/case-reference-values-across-templates-by-using-result-tags/1157).

I hope that helped,

Best,  
Borja

---

<div class="post-metadata">

**Author:** ![lieels01](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@lieels01](https://community.silverfin.com/u/lieels01)\
**Post date:** [February 14, 2022, 4:10pm UTC](https://community.silverfin.com/t/link-between-different-documents/97/10 "2022-02-14T16:10:04Z")

</div>

Hi Borja,

Thank you for the explanation, I tested it out on something and it works well.  
However, I’m afraid my case is a bit more difficult as it contains about 50 lines with different formulas and data. Is there perhaps a way to “bind” all these as one piece in template A and then refer to it in template B?

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/2X/5/5c664bc6fade650be28266779e619c3362094f8c.png)

---

<div class="post-metadata">

**Author:** ![Michiel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/michiel/32/2364_2.png) [@Michiel](https://community.silverfin.com/u/Michiel)\
**Post date:** [February 16, 2022, 1:07pm UTC](https://community.silverfin.com/t/link-between-different-documents/97/11 "2022-02-16T13:07:22Z")

</div>

Hi @lieels01 ,

Can you clarify what part of this code you’ld like to show in template B? All code within the `unless` statement?

If so, can you share how you tried to accomplish this? You might want to start using [shared parts](https://community.silverfin.com/t/case-use-shared-parts-across-several-reconciliations/1846), as indeed this is a lot of code that these two templates would share.

Kind regards,

Michiel

---

<div class="post-metadata">

**Author:** ![lieels01](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@lieels01](https://community.silverfin.com/u/lieels01)\
**Post date:** [February 22, 2022, 10:04am UTC](https://community.silverfin.com/t/link-between-different-documents/97/12 "2022-02-22T10:04:20Z")

</div>

Hi Michiel,

Thank you for trying to help, but we are going to set up a call with someone from the developer team to verify this.

Kind regards,
