How can I process related records in a script?
I have a Suppliers table and a related Products table and a related Inventory history table. I have a layout based on the Suppliers table with a portal (in a tab) showing the related products. The product record has a field for Inventory Count into which the user enters a value for the current inventory count. I would like to create records in the inventory history table containing the inventory date and count for each product, so we can later create reports showing the ups and downs of the inventory, by suplier and product, over time.
My thought is to have those records created via a script when the user exits the tab.
But I can't figure out how to create a found set of only those related records so I can loop through them to build the history file.
How do I do this? Is there a better way to create a history file?
FM12 Pro, Advanced. (Filemaker, not me).