# Default: value not taken into account

**URL:** <https://community.silverfin.com/t/default-value-not-taken-into-account/1392>\
**Category:** Templates\
**Tags:** variables, assign, attribute\_default\
**Created:** [February 19, 2019, 2:47pm UTC](https://community.silverfin.com/t/default-value-not-taken-into-account/1392 "2019-02-19T14:47:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Clesse](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/david_clesse/32/802_2.png) [@David\_Clesse](https://community.silverfin.com/u/David_Clesse)\
**Post date:** [February 19, 2019, 2:47pm UTC](https://community.silverfin.com/t/default-value-not-taken-into-account/1392/1 "2019-02-19T14:47:05Z")

</div>

Hello,  
input fields values are not computed right when they take their default: value.

For example: if we have a field “Value” with a default: of 5, and a column “Double” which displays its double (value\*2)  
The Double will display “0” although the field contains “5”.  
How to solve this?

---

<div class="post-metadata">

**Author:** ![SamVanEenoo](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/samvaneenoo/32/134_2.png) [@SamVanEenoo](https://community.silverfin.com/u/SamVanEenoo)\
**Post date:** [February 20, 2019, 8:50am UTC](https://community.silverfin.com/t/default-value-not-taken-into-account/1392/2 "2019-02-20T08:50:14Z")

</div>

Default values are not automatically saved in the database. We solve this problem by assigning a local variable which contains the default value if the database value is blank. The shortest way to do this is:

> ```
> {% input custom.some.value as:currency default:5 assign:some_value %}
> {{ some_value*2 }} 
> 
> ```

Kind regards  
Sam

---

<div class="post-metadata">

**Author:** ![David\_Clesse](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/david_clesse/32/802_2.png) [@David\_Clesse](https://community.silverfin.com/u/David_Clesse)\
**Post date:** [February 20, 2019, 4:30pm UTC](https://community.silverfin.com/t/default-value-not-taken-into-account/1392/3 "2019-02-20T16:30:13Z")

</div>

Thank you 🙂
