Change name field in disclosure

Hello,

In a disclosure I used the following code {% input period.custom.feed_forward.Activiteit as:text placeholder:’’ %}.

Problem is when we will copy the data from a previous year in the disclosure this field is not filled in.

I can solve the problem by changing the code into {% input custom.feed_forward.Activiteit as:text placeholder:’’ %} but if I do so the existing input will be lost.

How can I avoid this problem without creating a new disclosrure?

Thanks a lot,

Sylvie

Hi @svalais,

I assume by your question that you are working on a Text Document rather than on a Reconciliation.

If that’s so, you are right that you cannot copy data from one period to another, and because you are using period. in the input field, the data is only attached to that period.

Also, with the new approach ( custom.feed_forward.Activiteit ), this will not imply that the data can be copied over from one period to another, rather that the data will be the same for every period. A subtle different, since if you change it in one period you would be modifying it in all of them.

Having said that, I don’t see a straightforward solution to make the switch, since you probably don’t know in which period you have data right now ? So this is the work-around that I came up: creating a loop to check which is the latest period that your input field has information stored in it, and then use period.custom.feed_forward.Activiteit of that period as a default for the new custom.feed_forward.Activiteit.

Old input: {% input period.custom.feed_forward.Activiteit as:text placeholder:’’ %}

{% for i in (1..100) %}
  {% capture minus_p %}minus_{{ INT(i) }}p{% endcapture %}
  {% assign default_text = period.[minus_p].custom.feed_forward.Activiteit %}
  {% if default_text != blank %}
    {% break %}
  {% endif %}
{% endfor %}

New input: {% input custom.feed_forward.Activiteit as:text placeholder:’’ default:default_text %}

You can play around with this and check if this could be a possible solution :slight_smile:

Hi Agustin,

No this is a reconciliation.

When I change the code from period.custom.feed_forward.Activiteit to custom.feed_forward.Activiteit I can copy the data when I open the reconciliation and click on Copy Data.

But if I do this, the current data in the field period.custom.feed_forward.Activiteit will be empty.

This is wat we not will and we also not will to create a new reconciliation because we will not lose the info already available in the reconciliation.

How can I resolve this problem?

Thanks a lot,

Sylvie

Hi Agustin,

I have resolved my problem with your code.

Thanks a lot,

Sylvie

That’s great :slight_smile:

Since you mentioned you are working on a Reconciliation rather a Text Document. I think there is another way (and simpler) to accomplish something similar.

Old input: {% input period.custom.feed_forward.Activiteit as:text placeholder:’’ %}
New input: {% input custom.feed_forward.Activiteit as:text placeholder:’’ default:custom.feed_forward.old_input %}
{% rollforward period.custom.feed_forward.Activiteit custom.feed_forward.old_input %}

You could rollforward your original input to a new one that’s it is not linked to period, and then use that one as default of the new input.
That way, the data will be taken from the period selected when copying data. I would use something like this in a reconciliation.

You can give it a try as well!