Adding column values

Looking into adding a value from one column into another. I want to have the user input the value of Qty To Be Delivered and have a running tally added to another column, called Qty Drawn Off.

The Qty To Be Delivered will be changed and re-entered at different times, until the Qty Drawn Off is equivalent to Total Ordered column.

This is my expression for the Qty Drawn Off column, but this calculation is adding the two values together rather than adding the Qty To Be Delivered in a continuous tally.

Example: I have a Total Ordered value of 100, Qty Drawn Off is initially set to 0, using quick edit the user inputs value of 20 to Qty To Be Delivered causing the Qty Drawn Off to change to 20 also. Going back into quick edit sometime later the user inputs another 20 tallying the Qty Drawn Off to a total of 40 and so onโ€ฆ

The error occurring at the moment is the addition of two values, when I add 20 it adds to 0 but then I add another 20 later and it adds the two 20 values and then the additional input at that time. Any advice on this kind of expression use?

0 8 376
8 REPLIES 8

Do you need to see what was the latest โ€œQty To Be Deliveredโ€ value or can it be zero after uddate?

It cannot be 0 after update, that input value is used for checking delivery quantities later in the process

Do you need to update other columns as well?

At this stage and in this particular scenario all I need is the user to input the Qty to be delivered and that be added to a total stored in Qty Drawn off. The Total Ordered remains the same throughout, other values being updated later will not impact this process.

You would need to add a ChangeCounter column into your table and set the option โ€œUpdate modeโ€ as โ€œResetโ€. With this โ€œResetโ€ column, you can check if you changed the โ€œQty To Be Deliveredโ€ or not. For the update itself you need to do that with an Event action rather than an expression. When you save the existing record, you can evaluate the condition like [RESET]=1. That means it will update the calucaltion when you have updated the Qty column but if you have updated any other column, it doesnโ€™t recalculate the value.

So, I have set the Qty Drawn Off column to ChangeCounter on โ€˜Resetโ€™ update mode, watching for changes to Qty To Be Delivered. When a user inputs a new value to Qty To Be Delivered it resets the Qty Drawn Off column to โ€˜1โ€™. For my understanding could you clarify the event action process so I can continue please?

I probably wont need that app formula from now on, I shall remove that also

I made a small sample app so you can see how itโ€™s built. Check the app called โ€œCounterโ€ from hereโ€ฆ
https://www.appsheet.com/portfolio/531778

Top Labels in this Space