BUG *** Formula works differently when called by a workflow

So I have this forumula

([Total Time]*50)+(([Weight]/1000)*200)+SUM([Related Extras][Price])

To get around using it in a Virtual Column I have it in 3 places:
1 = As Initial Value with Reset on Edit turned on
2 = As an Event Action to update this when you create or edit an item in a sub table
3 = As an action in a workflow that runs when an item in a subtable is deleted

The first 2 work fine. 1 above calculates [Total Price] as £204. I then add a £100 item in a subtable and it updates the figure to £304. Proving that 2 above works. But When I delete the £100 item it calculates to £144. Hmmm

After much studying it’s the (([Weight]/1000)*200) is basically ignoring as this totals £60 in this example.

I’ve change this to ([Weight]*0.2) which mathmatically is the same, but why should this work and the other not, and why only in a workflow? Raising the issue as a new user might see this and stop using appsheet if it seems like it can’t even add up.

Fix for expression giving 0% or missing decimal part Tips & Tricks ?

Trying to divide two numbers to get a percentage but always getting 0? Trying to divide two numbers but losing the numbers after the decimal point? TRY THIS Convert one or both of the values in your division expression to a Decimal value, either by: (1) wrapping the value in the expression with the DECIMAL() function; (2) multiplying the value in the expression by 1.0; or (3) changing the column’s type to Decimal if suitable to the app. FOR EXAMPLE If computing a percentage from two Number co…

1 Like