# If-Then-Calculations: How to?

**URL:** <https://forum.bubble.io/t/if-then-calculations-how-to/35205>\
**Category:** Database\
**Created:** [August 7, 2018, 7:02pm UTC](https://forum.bubble.io/t/if-then-calculations-how-to/35205 "2018-08-07T19:02:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![finbu](https://avatars.discourse-cdn.com/v4/letter/f/4da419/32.png) [@finbu](https://forum.bubble.io/u/finbu)\
**Post date:** [August 7, 2018, 7:02pm UTC](https://forum.bubble.io/t/if-then-calculations-how-to/35205/1 "2018-08-07T19:02:33Z")

</div>

Hi everybody,

I have a form via which a user inputs a number of values, including a money value. I want to change this money value if the another field contains certain values.

E.g.: if field1 = yearly then money\_field = user\_input / 12.

And I will probably have to store the result in the same thing but a different field, so not to lose the original value. Can anybody show me how I can do this?

---

<div class="post-metadata">

**Author:** ![andrewgassen](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/andrewgassen/32/44248_2.png) [@andrewgassen](https://forum.bubble.io/u/andrewgassen)\
**Post date:** [August 7, 2018, 8:53pm UTC](https://forum.bubble.io/t/if-then-calculations-how-to/35205/2 "2018-08-07T20:53:32Z")

</div>

You’ll want to use Conditions for that. In the dark gray floating property editor, it’s the middle tab at the top.

---

<div class="post-metadata">

**Author:** ![asger.hansen](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@asger.hansen](https://forum.bubble.io/u/asger.hansen)\
**Post date:** [August 7, 2018, 11:48pm UTC](https://forum.bubble.io/t/if-then-calculations-how-to/35205/3 "2018-08-07T23:48:04Z")

</div>

@andrewgassen is it possible to use conditionality on API workflows? Can’t find the tab you mention in those workflows, but perhaps there is another way.

---

<div class="post-metadata">

**Author:** ![romanmg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/romanmg/32/237672_2.png) [@romanmg](https://forum.bubble.io/u/romanmg)\
**Post date:** [August 8, 2018, 12:33am UTC](https://forum.bubble.io/t/if-then-calculations-how-to/35205/4 "2018-08-08T00:33:56Z")

</div>

The API workflows let you add conditions to the Endpoints and actions themselves, just like regular workflows let you add conditions (the “only when” input you see at the bottom)

![08-07-38-39](https://us1.discourse-cdn.com/bubble/original/3X/b/5/b5a61a1fe516e76cd07f99a00102c2c8c53af7fe.jpg)

So, it sounds like you’ll just need to create two separate actions (within an API endpoint) with different conditions so that only one of them runs when something is true.

* * *

Gaby | [Coaching Bubble](https://coachingbubble.com?ref=forum)  
Private coaching, courses, and tons of free resources  
[Become a VIP Member](https://coachingbubble.com/vip-member?ref=forum) for immediate access to 100+ lessons, videos, webinars, and more

---

<div class="post-metadata">

**Author:** ![finbu](https://avatars.discourse-cdn.com/v4/letter/f/4da419/32.png) [@finbu](https://forum.bubble.io/u/finbu)\
**Post date:** [August 8, 2018, 9:30pm UTC](https://forum.bubble.io/t/if-then-calculations-how-to/35205/5 "2018-08-08T21:30:14Z")

</div>

Thanks for the help. In the end, I decided to change the form and enable a simpler solution, even if it isn’t perfect.
