Note that each time I import I only import for a single customer. I (so far) never have an instance where I import multiple customer's orders at the same time. I think this is an important point.
FileMaker can't read minds. How can you, just by looking at the data in your spreadsheet, tell what customer should be linked to the rows of data that you are importing into Orders?
If there is some kind of identifying info in at least one cell of your spreadsheet, there are ways to make this work.
For example, I have a layout where I am looking at the information of a single Customer (Customer 1). I'd like to put an import button, so when I import the data, it will put customer 1 in the Orders table. I would choose the appropriate file.
My Excel files are generated by a different program and I'd like to not have to edit the files with the customer # every time I want to import the data.
If I am currently selecting a record (Customer), is it possible to use that information when importing my Orders? Is it possible to use a script that will fill in the customer # with whatever record is active after importing?
Ok, that we can work with.
Manually, you could copy the primary key from your customer table to the clipboard, go to a layout based on orders and import your data. Immediately after import, your newly imported records make up the current found set of records and you can paste the value from your clipboard into the foreign key field that matches to the customer table's primary key. Then you use Replace Field Contents to put this same value into the same field of all the other newly imported orders records.
A script can make this an automatic process by capturing the current customer ID in a variable, importing the records to orders and then using Replace Field Contents to update them with the correct Customer ID.