# Custom formula doesn't always work

**URL:** <https://forum.adalo.com/t/custom-formula-doesnt-always-work/31367>\
**Category:** Get Help\
**Created:** [August 30, 2022, 4:09pm UTC](https://forum.adalo.com/t/custom-formula-doesnt-always-work/31367 "2022-08-30T16:09:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndrewV](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@AndrewV](https://forum.adalo.com/u/AndrewV)\
**Post date:** [August 30, 2022, 4:09pm UTC](https://forum.adalo.com/t/custom-formula-doesnt-always-work/31367/1 "2022-08-30T16:09:10Z")

</div>

Hello. My application has an input field for the number of items and a text field that shows the amount due. This amount is calculated using a custom formula: number from input field 1 \* price per unit of item #1 + input from field 2 \* price per unit of item #2, etc.  
The problem is that sometimes the calculation is done and sometimes not. Perhaps for this to work you need to refresh the page several times, perhaps this is not the reason.  
Can anyone help?

---

<div class="post-metadata">

**Author:** ![AndrewV](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@AndrewV](https://forum.adalo.com/u/AndrewV)\
**Post date:** [August 30, 2022, 4:23pm UTC](https://forum.adalo.com/t/custom-formula-doesnt-always-work/31367/2 "2022-08-30T16:23:04Z")

</div>

It looks like the problem was that the default value of the input fields was not set.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [September 9, 2022, 4:23pm UTC](https://forum.adalo.com/t/custom-formula-doesnt-always-work/31367/3 "2022-09-09T16:23:13Z")

</div>

Closed on September 9, 2022, 4:23pm UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
