Hi Alex that works ok for static expressions but how can put it inside search results?
May I explain a bit more in detail.
Let’s say I repair mobile phones and I want to keep a record of how many screws I have in the warehouse.
So I have one table that lists the screw names and qty in stock:
Also I have a table that states how many screws are used per phone:
Finally I have a table that records mobile phone sales:
So now on 24/01/21 I want to calculate the stock of screws I have .
So I have sold two HTC Phones.
Now I need to make a Workflow as such:
- Make changes to a list of Things
- Search COMPONENTS-LIST-TABLE
With Constraints: List Item being part of HTC Phone ( taken from second table PRODUCTS-LIST TABLE - another search) and make this calculation:
List Item’s"QTY In Warehouse" = Existing QTY in Warehouse - ( QTY Required Per Item * QTY of Phones SoLD )
So on the 24/01/21 ~If I would run the workflow I could see that the total stock of 15mm screws were. 2000 - ( 5 screws per phone * 2 Phones sold ) = 1990 in stock left.
Then the same workflow will carry on and update the next screw used in that day and it would be the 20mm screws.
Makes sense? Can I do that with Math.js basically use it inside the same workflow( not separate )?