Question

I am building an inventory logging system in LightSwitch and the requirements specify that each line should show the ending balance after the change like a check register.

I have 3 tables imported from a SQL Server. Products : used to specify product info

( ID, Name, Description, etc..)

InventoryLogs : used to log each change to inventory

( ID, DateTimeStamp, Person, ProductID, QuantityAdded, QuantityRemoved, EndingBalance)

InventoryCurrent : used to keep current inventory quantities to reduce calculation overhead

( ID, ProductID, Quantity )

I setup the InventoryLogs table as a screen that users can enter their changes to the inventory. I want the EndingBalance field to be automatically calculated from by getting the value from the InventoryCurrent table and adding/subtracting the change, but I can not seem to figure out how to do so.

Any help would be greatly appreciated!

Was it helpful?

Solution

I found what I needed. I was able to manipulate the save event to correct, and set the values.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top