I would think the creation of the trip sheet would happen from the work order? I'm also fuzzy on a version I haven't used for seven years (and had only used for a year before moving to 7) but this should be fairly easy so I'm not sure I really understand. You have explained your process beautifully but didn't indicate the specific problem so let's walk through it visually and let me know the point of issue:
From the work order (after it is created and the User selects the model to be worked on) ...
1) set a global field with WorkOrderID. You need this to tie the parts (in the trip sheet) to the work order
2) without script parameters and variables, you will also need to set a global field with the ModelID
3) Open the parts file and perform a search for the model
4) Go to your Trips file and import your parts records
5) While you still have a found set of new parts in your Trip file, use Replace Field Contents (or loop) to set the WorkOrderID and Model through those records (the PartID should be what you import).
UPDATE: The remaining part data can be displayed through the relationship from TripSheet::PartID = Parts::PartID.
Thank you for the reply.
OK I was able to make this work. I had to do some things a little different but it's working wonderfully.
OK, I was able to get the import to work. I couldn't get the global variable to work so I created separate scripts to copy the field I need and 'replace' the work order number in the imported set. The problem now is that when I do an import the first time it works. The second time it either can't find anything in the master database or it imports the wrong information.
I've narrowed the problem down to the find request. I copy the model number that I want to import records for and it will work once. After that each time I do the next record the copy doesn't seem to 'copy' the proper field or if it does something in the script reverts it back to the last 'copy'.
I have unchecked the restore find mode option on both the enter find mode and the perform find script steps.
The other weird thing is that on the computer that I have written the scripts and performed the initial find it seems to work sometimes but on all other computers using the same database it fails each time and either pulls in the wrong part numbers or can't find the data even though the data is in the master database.
So, I'm confused as to how in the world it can work once and not the second time.
Please help. I know it's got to be something simple at this point but I'm just hitting my head against the wall.