Copying related records from one portal to another
I've been using Filemaker for over a year, but I'm still new to scripting and am having trouble getting related records from one portal on a layout to copy to another portal on the same layout. Here are the details:
The main layout has several tabs for customer contact info, vendor info, quoted items and ordered items. On the items tab is a portal (portal A for this discussion) for entering multiple items in a related table (relation is the quote # in the main table to a quote # field in the quoted items table) with fields for part number, description, price each, quantity, and a calculation field for item subtotal. Also, I currently have a simple pop-up menu field with Yes/No to designate if an item is being ordered. What I am trying to do is to copy the quoted items in portal A to a similar portal (same fields minus the pop-up menu in a separate ordered items table) on the Ordered items tab through a scripted button or script trigger on the pop-up menu. Another factor is that this database is going to end up being published thru IWP so importing/exporting doesn't look to be available. Is there a way to set relationships or what scripting could I try to get the records copied over? I have not had much luck getting the loop command to run through each portal row for copy and paste purposes so any help there would be appreciated as well. I have been able to get the related records sorted, just not copied over to the ordered items table.
Any help is greatly appreciated. Thanks!