# Workflows - add formula to a NUM field possible?

**URL:** <https://community.noloco.io/t/workflows-add-formula-to-a-num-field-possible/1014>\
**Category:** Ask for Help\
**Created:** [July 21, 2024, 12:40pm UTC](https://community.noloco.io/t/workflows-add-formula-to-a-num-field-possible/1014 "2024-07-21T12:40:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Landbronx](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@Landbronx](https://community.noloco.io/u/Landbronx)\
**Post date:** [July 21, 2024, 12:40pm UTC](https://community.noloco.io/t/workflows-add-formula-to-a-num-field-possible/1014/1 "2024-07-21T12:40:06Z")

</div>

Hey,

Is it possible to add a formula to a NUM field in a workflow like this? Im not getting it to work.

When User Creates new project they have specify Size in m2.

I want the Amount in the workflow to be a % of this Size: Size\*0.2

And I also want the User to be able to edit this Amount once the project is created.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/noloco/original/1X/02789d5bffc2f265a484e87e4b23dd10471f4798.png)

---

<div class="post-metadata">

**Author:** ![darragh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.noloco.io/darragh/32/12_2.png) [@darragh](https://community.noloco.io/u/darragh)\
**Post date:** [July 22, 2024, 5:45am UTC](https://community.noloco.io/t/workflows-add-formula-to-a-num-field-possible/1014/2 "2024-07-22T05:45:20Z")

</div>

Hi @Landbronx you can’t use a formula like this but what you can do is create a formula field that will do the calculation (this will be read-only) but then you can use that in your workflow in place of where you’re doing your calculation.

This way you get an editable calculation of the initial value

---

<div class="post-metadata">

**Author:** ![Landbronx](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@Landbronx](https://community.noloco.io/u/Landbronx)\
**Post date:** [July 22, 2024, 1:51pm UTC](https://community.noloco.io/t/workflows-add-formula-to-a-num-field-possible/1014/3 "2024-07-22T13:51:25Z")

</div>

Hi @darragh, thank you for the help! Im not really getting it to work though.

I created a formula that does this, but its in another collection / table so I dont think it works because of that (I have a lookup field for it in my Project table but there are many values so perhaps that doesnt work?)

So i created another workflow within the same collection and that works, however the first workflow does not trigger workflow 2 so im stuck.

Is there a smart way of solving this?

I did a quick recording showing what I mean here:  
https://www.loom.com/embed/a9d167d2ba3440c6ad2fc8fdb887fc81?sid=4df6f856-c92c-497f-be36-4515cf64eeee

---

<div class="post-metadata">

**Author:** ![darragh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.noloco.io/darragh/32/12_2.png) [@darragh](https://community.noloco.io/u/darragh)\
**Post date:** [July 23, 2024, 6:25am UTC](https://community.noloco.io/t/workflows-add-formula-to-a-num-field-possible/1014/4 "2024-07-23T06:25:41Z")

</div>

Hey @Landbronx - having reviewed your loom (thank you very much)

I think your formula needs to be on the `Project` table, because that is what you are using currently in the `Klimatkalkyl` table to calculate `AmmountTemplate` through lookups, but you’re right, each project is linked to multiple `Klimatkalkyl` so you can’t easily use the lookup going that way.

My proposal is to write your formula on the `Project` table and then when creating your linked `Klimatkalkyl` in your workflow, you can use that formula to set the new value

---

<div class="post-metadata">

**Author:** ![Landbronx](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@Landbronx](https://community.noloco.io/u/Landbronx)\
**Post date:** [July 23, 2024, 8:38am UTC](https://community.noloco.io/t/workflows-add-formula-to-a-num-field-possible/1014/5 "2024-07-23T08:38:32Z")

</div>

Ok I will try this, but not sure how to do use a formula this way since i need to have a lookup with multiple values from Klimatkalkyl in the same field.

Lets say that in Klimatkalkyl there is different BuildingElements  
Innerwall {100 m2}  
Floor {500 m2}  
Roof {200 m2}

Where e.g. {100 m2} is calculated by {ProjectSize\*BuildingElement}

Each line in klimatkalkyl needs to be able to have a specific Amount depending on material type.

---

<div class="post-metadata">

**Author:** ![darragh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.noloco.io/darragh/32/12_2.png) [@darragh](https://community.noloco.io/u/darragh)\
**Post date:** [July 24, 2024, 10:19am UTC](https://community.noloco.io/t/workflows-add-formula-to-a-num-field-possible/1014/6 "2024-07-24T10:19:22Z")

</div>

I don’t understand why you’re creating a new `Klimatkalk` but saying you need to reference values in that table?

I think this is where I’m losing you.  
And in that case, would a formula just be better, does it need to be editable?
