# How to copy input from a reconciliation to another period?

**URL:** <https://community.silverfin.com/t/how-to-copy-input-from-a-reconciliation-to-another-period/1100>\
**Category:** Templates\
**Tags:** export\
**Created:** [August 8, 2018, 12:02pm UTC](https://community.silverfin.com/t/how-to-copy-input-from-a-reconciliation-to-another-period/1100 "2018-08-08T12:02:51Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandra](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@Alexandra](https://community.silverfin.com/u/Alexandra)\
**Post date:** [August 8, 2018, 12:02pm UTC](https://community.silverfin.com/t/how-to-copy-input-from-a-reconciliation-to-another-period/1100/1 "2018-08-08T12:02:51Z")

</div>

I prepared a reconciliation Template for capital grants which works well for the current period.  
I will have to update it each period.  
As I don’t want to re-enter each line every year, I would like to copy it in the new period and only modify some lines.  
For a client, I tried to copy it to another period.  
It did not work. But since I tried this the reconciliation is no more working in the previous period (error message:Liquid error: undefined method []’ for 0.6e5:BigDecimal|Liquid error: undefined method []’ for 0.6e5:BigDecimal)  
How should I adapt my code to allow it to be used each year without deleting the previous period ?

My code is the following :

  

* * *

-\> **DETAIL DES TRANSFERTS DE SUBSIDES AU RESULTAT** \<-

* * *
  

{% nic %}  
{::group}  
{:/group}  
{% endnic %}

|:--------------|:------------|:-------------|  
{%ic%} **Sélection des comptes liés aux subsides en capital :** {%endic%}|{% input custom[current\_account.number].dette.account\_15subside as:account\_collection range:15 default:15%}{%ic%} **#15 Subsides** {%endic%}{%assign account\_15subside=period.accounts.include\_zeros|range:custom[current\_account.number].dette.account\_15subside%}|{% input custom[current\_account.number].dette.account\_16ID as:account\_collection range:168 default:168%}{%ic%} **#16 Impôts différés liés aux subsides** {%endic%}{%assign account\_16ID=period.accounts.include\_zeros|range:custom[current\_account.number].dette.account\_16ID%}

{%assign $1=0%}{%assign $2=0%}{%assign $3=0%}{%assign $4=0%}{%assign $5=0%}{%assign $6=0%}{%assign $7=0%}{%assign $8=0%}{%assign $9=0%}

_**Subsides Région wallonne (Exonérés à l’impôt des sociétés)**_

|Date attribution Subside|N° dossier du subside|Montant du subside reçu|Investissements subsidiés|Amort cum. des biens subs.|Taxation du subside début de l’exercice|Transfert au résultat de l’exercice|Corrections éventuelles|Taxation du subside fin de l’exercice|Solde|  
|----10%—|–10%—|–10%—|–10%—|–10%—|–10%—|–10%—|–10%—|–10%—|-----|+{%fori subside in period.custom.subside%}  
{%stripnewlines%}  
|{% input subside.date as:date%}|  
{% input subside.dossier%}|  
{% input subside.montantrecu as:currency%}{%assign montantrecu=subside.montantrecu%}{%$2+ montantrecu%}|  
{% input subside.invsub as:currency%}|  
{% input subside.amortinvsub as:currency%}{%assign amortinvsub=subside.amortinvsub%}{%$3+ amortinvsub%}|  
{% input subside.taxdeb as:currency%}{%assign taxdeb=subside.taxdeb%}{%$4+ taxdeb%}|  
{%assign transfert=subside.montantrecu\*subside.amortinvsub/subside.invsub-subside.taxdeb%}{%=$5+ transfert|currency%}|  
{% input subside.corr as:currency%}{%assign corr=subside.corr%}{%$6+ corr%}|  
{%assign taxfin=subside.taxdeb+transfert+subside.corr%}{%=$7+ taxfin|currency%}|  
{%=$1+ subside.montantrecu-taxfin|currency%}|{%endstripnewlines%}{%endfori%}

|----10%-----------|-10%-|--------10%--------|–10%—|--------10%--------|-------10%---------|---------10%-------|--------10%--------|--------10%--------|-----|+  
| **TOTAL SUBSIDES** | | **{{$2|currency}}** | | **{{$3|currency}}** | **{{$4|currency}}** | **{{$5|currency}}** | **{{$6|currency}}** | **{{$7|currency}}** | **{{$1|currency}}** |

|–10%–|:—+  
|{%ic%}Subsides en capital :{%endic%}|{%if account\_15subside.value=$1%}{%unexplained 0 as:indicator%}{%else%}{%unexplained account\_15subside.value+$1 as:indicator%}{%endif%}|{%ic%}{{$1|currency}}{%endic%}|{%ic%}{{account\_15subside.value|currency}}{%endic%}|{%ic%}{{account\_15subside.value+$1|currency}}{%endic%}

---

<div class="post-metadata">

**Author:** ![SamVanEenoo](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/samvaneenoo/32/134_2.png) [@SamVanEenoo](https://community.silverfin.com/u/SamVanEenoo)\
**Post date:** [August 8, 2018, 1:12pm UTC](https://community.silverfin.com/t/how-to-copy-input-from-a-reconciliation-to-another-period/1100/2 "2018-08-08T13:12:04Z")

</div>

Hi Alexandra

Only error I see so far in your code is the following:

> {%if account\_15subside.value=$1%}

When comparing 2 variables with eachother, you need to use 2 equals signs.  
Using one equal sign is exclusively to assign a value to a variable.

If this fix doesn’t solve the problem, let me know.

Kind regards  
Sam

---

<div class="post-metadata">

**Author:** ![Alexandra](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@Alexandra](https://community.silverfin.com/u/Alexandra)\
**Post date:** [August 8, 2018, 2:32pm UTC](https://community.silverfin.com/t/how-to-copy-input-from-a-reconciliation-to-another-period/1100/3 "2018-08-08T14:32:14Z")

</div>

Thank you for your answer.

I fixed the problem by canceling “period” in my fori loop.  
{%fori subside in period.custom.subside%}

---

<div class="post-metadata">

**Author:** ![SamVanEenoo](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/samvaneenoo/32/134_2.png) [@SamVanEenoo](https://community.silverfin.com/u/SamVanEenoo)\
**Post date:** [August 9, 2018, 6:43am UTC](https://community.silverfin.com/t/how-to-copy-input-from-a-reconciliation-to-another-period/1100/4 "2018-08-09T06:43:49Z")

</div>

Hi Alexandra

Good thing you found it yourself.  
Reconciliations are automatically attached to periods so they indeed don’t need the period part.  
Nice work!

Kind regards  
Sam

---

<div class="post-metadata">

**Author:** ![Thijs](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@Thijs](https://community.silverfin.com/u/Thijs)\
**Post date:** [February 1, 2019, 10:50am UTC](https://community.silverfin.com/t/how-to-copy-input-from-a-reconciliation-to-another-period/1100/5 "2019-02-01T10:50:36Z")

</div>

Hi,

@SamVanEenoo

Is it (with a workaround) possible to copy data to another period with the period.custom drop?

Removing period in period.custom did indeed the trick, but i my case there is already to many data that will be lost if period in period.custom will be removed.

Any solutions?

Many thanks!

---

<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 24, 2019, 8:27am UTC](https://community.silverfin.com/t/how-to-copy-input-from-a-reconciliation-to-another-period/1100/6 "2019-05-24T08:27:46Z")

</div>

Hi @Thijs,

Sorry for getting back to you only now.

As you’ve might’ve noticed, using the `period.` in an account or reconciliation template will cause the “copy data” function to not work at all.

So never use period.custom in those templates.

to get back to your question :

> Is it (with a workaround) possible to copy data to another period with the period.custom drop?

Actually, there is.

You could create a text template where you have your period.custom drop but you’ll add a rollforward to it that will copy data from your period.custom to the new period custom drop.

The rollfoward is explained here:

> [@CASE rollforward: copy amounts into other objects from one year to the next year](https://community.silverfin.com/t/case-rollforward-copy-amounts-into-other-objects-from-one-year-to-the-next-year/1158):
>
> Let’s say we manually put in some movements regarding financial investments in year 2016: It would be great then, when copying these details from 2016 to 2017, the amounts in column End value would be transferred to the column Begin value (so I don’t need to manually overwrite those amounts, because copying details is just a copy of one period). bulb With the rollforward-tag you can however! This allows to mark a certain input-object or variable to be transferred to another object or…

Hope this helps and I’m not too theoretically - let me know if you are stuck and perhaps I can create a case for this as well

---

<div class="post-metadata">

**Author:** ![Thijs](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@Thijs](https://community.silverfin.com/u/Thijs)\
**Post date:** [May 24, 2019, 9:33am UTC](https://community.silverfin.com/t/how-to-copy-input-from-a-reconciliation-to-another-period/1100/7 "2019-05-24T09:33:23Z")

</div>

Hi @sven,

Thanks for the response!  
Seems cool, I’ll get into it!

---

<div class="post-metadata">

**Author:** ![Thijs](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@Thijs](https://community.silverfin.com/u/Thijs)\
**Post date:** [May 24, 2019, 11:07am UTC](https://community.silverfin.com/t/how-to-copy-input-from-a-reconciliation-to-another-period/1100/8 "2019-05-24T11:07:02Z")

</div>

Hi @sven

This does not seem te work?

> {% for overeenstemming in period.custom.overeenstemmingen %}  
> {% input overeenstemming.bedrijfsleider %}  
> {% rollforward overeenstemming.bedrijfsleider overeenstemming.bedrijfsleider %}  
> {% endfor %}

Or do I need to assign something?

Many thanks!

---

<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 24, 2019, 12:18pm UTC](https://community.silverfin.com/t/how-to-copy-input-from-a-reconciliation-to-another-period/1100/9 "2019-05-24T12:18:59Z")

</div>

Great case, isn’t it @Thijs?

I created a separate case for this, as some others might benefit from this as well:

> [@CASE: migrate data from one collection to another with the rollforward function (copy details)](https://community.silverfin.com/t/case-migrate-data-from-one-collection-to-another-with-the-rollforward-function-copy-details/1493):
>
> What if we have a situation where we create a reconciliation template in which the custom collection was incorrectly linked to the period drop, like this : {% fori overeenstemming in period.custom.overeenstemmingen %} {% input overeenstemming.bedrijfsleider %} {% endfori %} As you know, custom drops never can be linked to the period drop - doing so will result in a malfunction of copying data from one period to another (there simply will be no data copied, all because the custom drop is link…

Hope you can adapt this internally with you - if not, you know how to reach out.  
Apologies again for the delay in answer 😔

---

<div class="post-metadata">

**Author:** ![Tanguy](https://avatars.discourse-cdn.com/v4/letter/t/9fc29f/32.png) [@Tanguy](https://community.silverfin.com/u/Tanguy)\
**Post date:** [January 7, 2020, 11:15am UTC](https://community.silverfin.com/t/how-to-copy-input-from-a-reconciliation-to-another-period/1100/10 "2020-01-07T11:15:51Z")

</div>

How to become that when you press enter in an inputbox, that you receive a new line?

---

<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:** [January 7, 2020, 11:25am UTC](https://community.silverfin.com/t/how-to-copy-input-from-a-reconciliation-to-another-period/1100/11 "2020-01-07T11:25:50Z")

</div>

> How to become that when you press enter in an inputbox, that you receive a new line?

Hi there,

What you are triying to do can be achieved by creating a custom drop with a foriloop like this:

```auto
{% fori item in custom.the_namespace %}
  {{ item.some_data}}
{% endfori %}

```

Please have a look at our developer website for more information: [Iterations](https://developer.silverfin.com/docs/iterations)

Also feel free to create a new topic next time in the community as I can see this question was not linked to the original post.

Best,  
Borja

---

<div class="post-metadata">

**Author:** ![Tanguy](https://avatars.discourse-cdn.com/v4/letter/t/9fc29f/32.png) [@Tanguy](https://community.silverfin.com/u/Tanguy)\
**Post date:** [January 7, 2020, 11:26am UTC](https://community.silverfin.com/t/how-to-copy-input-from-a-reconciliation-to-another-period/1100/12 "2020-01-07T11:26:25Z")

</div>

Ok thanks i will test it
