Inserting records from one set of related table to another set
I'm having two issues (related) that I know how to do with SQL but can't figure out how to do in Filemaker.
Think of a dummy order with items associated to it. Every school quarter that dummy order needs to be duplicated (both the order and items) without having to manually everything again (a duplicate order button).
The second issue is to create an actual order from the dummy order without changing the dummy order (will be used multiple times.
In SQL I would select the dummy order header, build an actual order header (separate table), build a cursor of the dummy items and using a while loop, insert records into the actual order items table (separate table) where the new order can be modified as needed (thus eliminating the ability to have a one to many relationship from the dummy items to the real items).
For the first issue I know I can duplicate a dummy header but how do I duplicate the items?
Same for the second issue.I know I can use a portal to create the real order table, but how do I copy the items?
I can't find any script commands that will do this. Any ideas?