# CASE: rollforward files to another database variable

**URL:** https://community.silverfin.com/t/case-rollforward-files-to-another-database-variable/1861
**Category:** Cases
**Tags:** rollforward, roll-forward, file
**Created:** [August 11, 2020, 6:48am UTC](https://community.silverfin.com/t/case-rollforward-files-to-another-database-variable/1861 "2020-08-11T06:48:41Z")
**Posts on this page:** 1
**Page:** 1

<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: [August 11, 2020, 6:48am UTC](https://community.silverfin.com/t/case-rollforward-files-to-another-database-variable/1861/1 "2020-08-11T06:48:41Z")

</div>

In addition to this case:

> [@CASE: use rollforward for files](https://community.silverfin.com/t/case-use-rollforward-for-files/1410):
>
> When you copy details from one period to another, and attachments were added in the original period, then these attachments were copied as well to the new period. In most cases, the attachments of the old period are irrelevant in the new period. So, by using the roll forward function (more info on that [here](https://community.silverfin.com/t/case-rollforward-copy-amounts-into-other-objects-from-one-year-to-the-next-year/1158)), you can now make it so that attachments will not be copied at all, by using this: {% input custom.some.file as:file %} {% rollforward nil custom.some.file as:file %} When copying detail…

have we now implemented an update in which you can rollforward a file from one database variable to another (previously, that was only possible to the same variable).

Easy code example:

```auto
{% input custom.invoice.pdf_1 as:file %}

{% input custom.invoices.last_year as:file %}

{% comment %}
ROLL FORWARD logic
{% endcomment %}
{% rollforward nil custom.invoice.pdf_1 as:file %}
{% rollforward custom.invoice.pdf_1 custom.invoices.last_year as:file %}

```

As you can see, I will set the original database variable to nil, and roll forward it to another db variable.

Please do not mind the naming of the database variables; it’s an example to clarify the new coding 😊
