# Reset default values in a document

**URL:** <https://community.silverfin.com/t/reset-default-values-in-a-document/1599>\
**Category:** Templates\
**Created:** [November 8, 2019, 1:44pm UTC](https://community.silverfin.com/t/reset-default-values-in-a-document/1599 "2019-11-08T13:44:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Warde](https://avatars.discourse-cdn.com/v4/letter/w/5f9b8f/32.png) [@Warde](https://community.silverfin.com/u/Warde)\
**Post date:** [November 8, 2019, 1:44pm UTC](https://community.silverfin.com/t/reset-default-values-in-a-document/1599/1 "2019-11-08T13:44:13Z")

</div>

I have the code below. The aim is to show a default input text, with the possibility to overwrite it.

Different people will use this document.

If a first person changes the text, the second user won’t see the default text (unless the input text is deleted).

I might have several of such input fields with a default input. All of these fields might be changed so the document that is seen by for instance a third user, might be quite different from the default one.

I suppose there is no way to reset a document to all of its default values?

{% capture default %}Dit is de standaardtekst{% endcapture %}

{% ic %}  
{% input company.custom.omschrijving.algemeen as:text default:default %}  
{% endic %}

{% capture output %}{% if company.custom.omschrijving.algemeen == empty %}{{default}}{% else %}{{company.custom.omschrijving.algemeen}}{% endif %}{% endcapture %}

{{output}}

---

<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:** [November 12, 2019, 5:42pm UTC](https://community.silverfin.com/t/reset-default-values-in-a-document/1599/2 "2019-11-12T17:42:09Z")

</div>

Hi @Warde,

Well, good question though 😊

If you delete the value of that input, you’ll see the default value and the input is actually reset, no?  
Also, when a default changes, you’ll see that too (below is a screenshot of our Silverfin changelog):

 ![49](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/2X/c/cb0f3ef840e30661a85eb4ca108a26afff7656b2.png)

But you’ll probably want to see the default, even if the input is changed from the default?  
Then you could use what you coded and display the default in an infotext as hover perhaps?

Hope this clarifies it a bit for you?

---

<div class="post-metadata">

**Author:** ![Warde](https://avatars.discourse-cdn.com/v4/letter/w/5f9b8f/32.png) [@Warde](https://community.silverfin.com/u/Warde)\
**Post date:** [November 12, 2019, 8:14pm UTC](https://community.silverfin.com/t/reset-default-values-in-a-document/1599/3 "2019-11-12T20:14:07Z")

</div>

Hi, tx Sven.

The question is rather about resetting let’s say for instance 10 or 20 input fields all at once to there default values.  
It is indeed possible to do this one by one by deleting the input text, but it would be easier to have it done in one action. The latter would also guarantee that one can start with a “clean” document with all of its default values. Doing it one by one does not only takes more time, there is also a higher risk of skipping one of the fields.  
But based on your answer, I understand there is no such way to do it all at once.

Ward

---

<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:** [November 13, 2019, 7:34am UTC](https://community.silverfin.com/t/reset-default-values-in-a-document/1599/4 "2019-11-13T07:34:41Z")

</div>

I’m afraid not @Warde, unless you create a boolean on top of your document. When checked, you show the default (with no option to overwrite), otherwise you just show the inputs with the actual values.

That could be something, but not a big fan of working like that, as the boolean will hide values that are actually stored in the database.  
But it maybe gives you an idea?

I was thinking you could use the `rollforward` function perhaps too, but that’s just from one period to another.  
More info 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…

But imo, that too is not a good workaround, as it is not meant for that and you want to reset values within one period.

If you’re still stuck on this, please, let us known so we can find something together.
