Workflow - Calculated Fields

Hi there,

We made a custom module called “Inventory” to track some assets. I was hoping to have a simple Workflow that updates the “Total Value” field based on two other fields within the module (“Quantity” and “Value (per item)”)

Originally, this topic was intended to be a question about if this was possible and if so then what would the equation be. I figured it out while writing, but wanted to create the topic anyway in case people have this question in the future. So if that’s you, please reply letting you know this helped!

Steps to create:
New Workflow
Select Module
Added condition “Date Modified” “Equal to” “Any Change”

Actions:
Select Action: Calculated Field
Parameters: Add “Quantity” and “Value (per item)”
This gives each parameter a variable {P0} and {P1}

Formulas:
Selected “Total Value” field. Clicked “Add formula”

Formula used: {multiply({P0};{P1})}

Where I messed up was not putting the parameters in {} brackets. This is probably basic to all of you, but I"m hoping it helps anyone else who is struggling with parameters and calculated fields.

4 Likes

I believe this can be sorted via JS where it looks at both fields and then determines what the value is in another field. We’ve done this for calculations on modules.

Hi @sfyall,

Welcome to the community! :tada:

Thanks for this quick guide on the workflow you made, i’m sure this will be very useful to many out there who where in the same position as yourself!

Just wanted to check with you

We created a field call Inventory level in Products module and wanted to reduce the count of inventory when there is a invoice which is created for that specific product

When we are using a below steps

  1. New Workflow
  2. Select Module - Invoices
  3. Adding a condition that product line items quotes -> Quantity should be greater than zero

Actions:
select action: Calculated Field
Parameters: we are not able to see any quantity from Line items module or inventory field from products