Rollforward

The rollforward tag is used to copy data from one period to another.

Rollforward is used to copy data from a chosen period to a database variable in the current period. This is done by pressing the copy data option under the action button in the Silverfin platform.

{% rollforward custom.depreciation.passed+custom.depreciation.current custom.depreciation.passed %}

{% rollforward nil custom.depreciation.current %}

When copying data from 2017 to 2018, the code above will add the depreciations of 2017 with the depreciations of the past and put them in the depreciations of the past field of 2018. Meanwhile, the depreciation value of 2018 is set to nil. This way, the current value of 2017 is not taken over.

Rollforward.period

It is possible to use rollforward.period to check from which period the data is copied. This can be useful if you only want to rollforward in specific cases.

Files

To use the rollforward tag to copy files to a new custom drop, collection or make the file input blank during the copy details, you can add the as:file attribute to the rollforward tag so that attachments will be copied to the new custom/collection or ensure they’re not be copied at all.

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

{% rollforward nil custom.invoice.pdf_1 as:file %}
{% rollforward custom.invoice.pdf_1 custom.invoices.last_year as:file %}

When copying details, this will make sure no attachment is copied.