Run into a dilemna not sure how to update a secondary item when updating the first record, need some clues.
Am working on stock management transferring stock quanties from one product warehouse to another product warehouse.
Am presuming I would need to first find the related record which will go something like this:
FIND ProductControl WHERE StockTransferLineItem.Items.ItemCode=ProductControl.ItemCode AND StockTransferLineItem.DeliverTo=ProductControl.Warehouses
However once find how do I get the item updated with a new stock quantity, would imaging something like:
SET ProductControl FROM StockTransferLineItem WITH ProductControl.CurrentStock=ProductControl.CurrentStock+StockTransferLineItem.Quantity
But I know this is wrong just looking for the correct way, any assistance would be greatly appreciated.
Updating a second record based on changes to first record
No worries, you might also want to modify your FIND statement slightly from:
FIND ProductControl WHERE StockTransferLineItem.Items.ItemCode=ProductControl.ItemCode AND StockTransferLineItem.DeliverTo=ProductControl.Warehouses
To:
FIND ProductControl WHERE (StockTransferLineItem.Items.ItemCode=ThisProductControl.ItemCode AND StockTransferLineItem.DeliverTo=ThisProductControl.Warehouses) IN BATCHES OF 1
Cheers,
Pete
FIND ProductControl WHERE StockTransferLineItem.Items.ItemCode=ProductControl.ItemCode AND StockTransferLineItem.DeliverTo=ProductControl.Warehouses
To:
FIND ProductControl WHERE (StockTransferLineItem.Items.ItemCode=ThisProductControl.ItemCode AND StockTransferLineItem.DeliverTo=ThisProductControl.Warehouses) IN BATCHES OF 1
Cheers,
Pete
Pete Bradstreet
Contract developer of commercialized applications
AwareIM Ver. 8.2
Contract developer of commercialized applications
AwareIM Ver. 8.2