Rollfoward does not work

Hello,

I have built a new disclosure and in this disclosure I have worked with the function rollforward but this does not seem to work.

Here you will find the code that I used.

{% stripnewlines %}
| 
| 
|
{% newline %}
|---35%-----
|---15%-----
|---50%-----+
{% newline %}
|] **Periodicity**
|] {% input custom.VAT_Check.Periodicity as:select options:"Month|Quarter" option_values:"1|2" default:custom.VAT_Check.Periodicity %} {% rollforward period.custom.VAT_Check.Periodicity custom.VAT_Check.Periodicity %}
|] 
[{% newline %}
|] **VAT-unity**
|] {% input custom.VAT_Check.VATUnity as:select options:"Yes|No" option_values:"1|2" default:custom.VAT_Check.VATUnity %} {% rollforward period.custom.VAT_Check.VATUnity custom.VAT_Check.VATUnity %}
|] {% input custom.VAT_Check.VATUnity_Name as:text placeholder:'Name VAT-unity' default:custom.VAT_Check.VATUnity_Name %} {% rollforward period.custom.VAT_Check.VATUnity_Name custom.VAT_Check.VATUnity_Name %}
[{% newline %}
|] **VAT-ratio?**
|] {% input custom.VAT_Check.VATRatio as:select options:"Yes|No" option_values:"1|2" default:custom.VAT_Check.VATRatio %} {% rollforward period.custom.VAT_Check.VATRatio custom.VAT_Check.VATRatio %}
|] {% input custom.VAT_Check.VATRation_Remark as:text placeholder:'Remarks regarding VAT-ratio' default:custom.VAT_Check.VATRation_Remark %} {% rollforward period.custom.VAT_Check.VATRation_Remark custom.VAT_Check.VATRation_Remark %}
[{% newline %}
|] **VAT info fiche**
|] 
|] {% input custom.VAT_Check.VATInfoFiche_Link as:text placeholder:'Add link existing VAT info fiche ' %} {% rollforward nil custom.VAT_Check.VATInfoFiche_Link %}
[{% newline %}
]_
|]_
|]_
[{% endstripnewlines %}

Can you tell me what I’m doing wrong?

Thanks a lot,

Sylvie

Problem solved.

Hi @svalais !

Nice to hear you got it working! Looking over your code, it seems the issue might have been related to a syntax error. Is that what you found?

It seems to me that you have the parameters reversed. For example:

{% rollforward period.custom.VAT_Check.Periodicity custom.VAT_Check.Periodicity %}

This is trying to rollforward from period.custom.VAT_Check.Periodicity to custom.VAT_Check.Periodicity, but period.custom already is the current period’s custom data. You’re essentially trying to copy something to itself.

The rollforward tag should reference the previous period as the source. The correct syntax is:

{% rollforward custom.VAT_Check.Periodicity %}

Or if you need to specify both source and target explicitly:

{% rollforward period.minus_1y.custom.VAT_Check.Periodicity custom.VAT_Check.Periodicity %}

Kind regards

Delphine