Best way to copy data from one portal to another?
I've created an inventory system with files for Purchase Orders, Purchase Order Line Items, Receipts and Receipts Line Items.
The Receipts layout has 2 portals -- one for Purchase Order Line Items and one for Receipts Line Items.
I've related the PO # field to the Receipts file, so that when I enter the PO #, all the items from the detail (Purchase Order Line Items) display in Receipts.
What I would like to do is to copy & paste via script all the line items info from the Purchase Order Line Items into new Receipts Line Items entries so that I don't have to manually add each line item to the Receipts Line Items detail. I've researched various methods involving SetField but I can only get the first record to correctly get copied over, so I'm stumped.