Refresh Portal Line Items
I am currently have a three tables: Purchase Orders, Line Items, and Parts Inventory. Each record in those tables has a unique identifier: kp_POID, kp_LineItemID, kp_PartID respectively. Additionally, the Line Items table has two dependent fields, kf_POID, and kf_PartID - which are related to the primary fields of the same name of the other tables.
I currently have a portal on my Purchase Order layout that links to my Line Items. These line items are added via a script through a search bar and add button that searches the Parts Inventory table (for whatever was typed in the search bar), and then adds the desired result to the line items of that PO. It does this by going to the Line Items table, creating a new line item (new kp_LineItemID) and adding that Part to that line item's kf_PartID, via the part's kp_PartID, and finally adding the current PO's kp_POID to the kf_POID field (thus establishing a link between that line item and the PO in addition to the part).
The line items table then has other fields that lookup that part's information from the Parts Inventory table (Manufacturer, Price, Quantity, etc) via that kp_PartID -> kf_PartID relationship. Finally, the script goes back to the original PO's layout and one sees the line item in the portal, with all of the desired information.
This solution has been working wonders for me - however, I ran into a small problem here. If I find out later that something about that part isn't correct (say it was originally thought that the manufacturer was Microsoft, and I find out it was actually made by Apple) and I go and change the Manufacturer's ID in the Parts Inventory table, that line item from my PO still says the part was manufactured by Microsoft.
This makes sense because the portal line item is a separate record from the Line Items table, but I would love to implement a "Refresh" button on my PO Layout. The basic idea would enable the user to fix some or many aspects of the part (except of course its unique kp_PartID) in the Parts Inventory, and then come back to that PO, hit "Refresh", and then have that line item update to the recently corrected manufacturer (or whatever it may be). I'm pretty sure this can be implemented, but I'm having trouble figuring out how FileMaker can do this. Can anybody help? Thanks.