# Generate multiple attestations based on information in a table

**URL:** https://community.silverfin.com/t/generate-multiple-attestations-based-on-information-in-a-table/1478
**Category:** Templates
**Created:** [May 15, 2019, 9:41am UTC](https://community.silverfin.com/t/generate-multiple-attestations-based-on-information-in-a-table/1478 "2019-05-15T09:41:48Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![sylvia.debaeremaeker](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@sylvia.debaeremaeker](https://community.silverfin.com/u/sylvia.debaeremaeker)
#### Post date: [May 15, 2019, 9:41am UTC](https://community.silverfin.com/t/generate-multiple-attestations-based-on-information-in-a-table/1478/1 "2019-05-15T09:41:48Z")

</div>

Hi

I want to generate an attestation for each company mentionned in the table.  
Each time with the corresponding address and starting on a new page.  
How can i do that?

{% stripnewlines %}  
{% newline %}  
|Naam ontvanger  
|Adres  
|Postcode  
|Gemeente  
{% newline %}

| — |
| --- |
| — |
| —# |

{% fori ontvanger in custom.ontvanger %}  
{% newline %}  
|{% $15+input ontvanger.naam placeholder:" " %}  
|{% $16+input ontvanger.adres placeholder:" " %}  
|{% $17+input ontvanger.postcode placeholder:" " %}  
|{% $18+input ontvanger.gemeente placeholder:" " %}  
{% endfori %}  
{% endstripnewlines %}

Opgemaakt te {{ $18 }} op {{ ‘today’ | date: ‘%d/%m/%y’ }}

  
  
  
  

{{ $15 }}  
{{ $16 }}  
{{ $17 }} {{ $18 }}

---

<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: [May 15, 2019, 10:12am UTC](https://community.silverfin.com/t/generate-multiple-attestations-based-on-information-in-a-table/1478/2 "2019-05-15T10:12:32Z")

</div>

Hi Sylvia,

Can you please re-paste your code in line with [the rules we established for the community](https://community.silverfin.com/t/new-in-community-new-to-coding-templates-read-this-first/941)?

Can you also elaborate on what your specific problem is? Furthermore I noticed you use registers for names, adresses… These are no valid cases to use registers. More info on how to use registers can be found on our [read me.io page](https://developer.silverfin.com/docs/variables#section-registers).

Kind regards,  
Michiel

---

<div class="post-metadata">

### Author: ![sylvia.debaeremaeker](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@sylvia.debaeremaeker](https://community.silverfin.com/u/sylvia.debaeremaeker)
#### Post date: [May 15, 2019, 11:27am UTC](https://community.silverfin.com/t/generate-multiple-attestations-based-on-information-in-a-table/1478/3 "2019-05-15T11:27:51Z")

</div>

Hi Michiel

For all the companies listed in the table i need a certificate (per company). On the certificat i want the name and the address metntionned in the table.

Code: table:

> {% stripnewlines %}  
> {% newline %}  
> |Naam ontvanger  
> |Adres  
> |Postcode  
> |Gemeente  
> {% fori ontvanger in custom.ontvanger %}  
> {% newline %}  
> |{% input ontvanger.naam placeholder:" " %}  
> |{% input ontvanger.adres placeholder:" " %}  
> |{% input ontvanger.postcode placeholder:" " %}  
> |{% input ontvanger.gemeente placeholder:" " %}  
> {% endfori %}  
> {% endstripnewlines %}

Code certificate:

> * * *
> 
> → **Attest m.b.t. de uitkering van dividenden door {{ company.company\_form }} {{ company.name }}** ←
> 
> * * *
> 
> → **Roerende voorheffing** ←
> 
> → **_Attest_** ←   
> → _(opgesteld ter uitvoering van art. 106,§6, KB)_ ←
> 
> Van de inning van de roerende voorheffing wordt volledig afgezien met betrekking tot dividenden waarvan de schuldenaar en de verkrijger binnenlandse vennootschappen zijn.
> 
> Opgesteld n.a.v. de dividenduitbetaling door  
> {{ company.company\_form }} {{ company.name }}  
> {{ company.street }}  
> {{ company.city }}
> 
> als gevolg van de beslissing van de Algemene Vergadering van {{ period.custom.av.datum }}.
> 
> De genieter van de inkomsten bevestigt dat op het ogenblik van de toekenning van de inkomsten, de deelneming minstens 10% van het kapitaal van bovenvermelde vennootschap vertegenwoordigt en die minimumdeelneming van 10% gedurende een ononderbroken periode van minstens 1 jaar werd aangehouden.
> 
> Opgemaakt te {{ ontvanger.gemeente }} op {{ ‘today’ | date: ‘%d/%m/%y’ }}
> 
>   
>   
>   
>   
> 
> {{ ontvanger.naam }}  
> {{ ontvanger.adres }}  
> {{ ontvanger.postcode }} {{ ontvanger.gemeente }}  
> _(handtekening en hoedanigheid van de gevolmachtigde)_  
> {% endif %}

---

<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: [May 15, 2019, 12:08pm UTC](https://community.silverfin.com/t/generate-multiple-attestations-based-on-information-in-a-table/1478/4 "2019-05-15T12:08:31Z")

</div>

Hi Sylvia,

you should add the complete code of your certificate in a new for loop after your fori loop. It could look like this:

```auto
{% for ontvanger in custom.ontvanger %}
   Code certificate that you posted
{% endfor %}

```

Note that if both loops are in different templates, you will have to make use of a handle.

Kind regards,

Michiel

---

<div class="post-metadata">

### Author: ![sylvia.debaeremaeker](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@sylvia.debaeremaeker](https://community.silverfin.com/u/sylvia.debaeremaeker)
#### Post date: [May 16, 2019, 7:00am UTC](https://community.silverfin.com/t/generate-multiple-attestations-based-on-information-in-a-table/1478/5 "2019-05-16T07:00:18Z")

</div>

Thx Michiel!

---

<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: [May 20, 2019, 10:58am UTC](https://community.silverfin.com/t/generate-multiple-attestations-based-on-information-in-a-table/1478/6 "2019-05-20T10:58:42Z")

</div>


