You could script the process in the Service Database, passing the fields values across as script parameters.
Are they linked at all, by this I mean is Service database set as a Data Source in the first db?
If so, make a script in the service database, which creates the record and pulls out the script parameters.
Then call this script from the first database when you want to copy the data across.
If you want more info on this, let me know.
If you link the tables in the two files with a relationship, you shouldn't have to copy over so much data. Instead you'd just send the correct serial number to the record in your original file so that your second file can reference all fields needed in the original table. If you do need to physically copy the data (this is sometimes needed to log a "snap shot" of the data current at the time you do something like this), you'd still send just the one value and use looked up value settings on your various fields to copy over the data.
I ended up doing that, but I still need to copy the serial number from the customers database into the service database. I can't use copy/paste because the script already does that to copy the customers ID number. I cannot seem to get the variable idea to work.
Copy/paste is not a good option for moving data around within filemaker. It's fragile, simple layout changes can cause your script to fail to copy or paste and users get ticked off when the text they copied to the clipboard mysteriously disappears--replaced by the data your script copied.
As SW said, you can pass the data as a parameter to the script called in the other file. You can even pass multiple items in the same parameter.
Here's an example of how it looks:
In file 1:
Perform Script ["Script Name" from file: "File 1" ; Parameter: YourTable::SerialField & " " & YourTable::CustomerIDfield ]
the script in file 2:
Set field [Yourtable::SerialField; Leftwords ( Get ( ScriptParameter ) ; 1 ) ]
Set field [Yourtable::CustomerIDField; Rightwords ( Get ( ScriptParameter ) ; 1 ]
Now you've passed two pieces of data in a single parameter to the called script in file 2.
I had no idea about script parameters. That literally just made my whole job 1,000 times easier. Thank you so much.
I now have another question that arises. When I want to check in a computer, I have a portal of the customers computers with a button in every row to create a service case. My idea is that pressing the button in the row will create a service record for the computer in the same line. But when I pass the serial number as a parameter is always does the first serial number in the portal.
Is the parameter referencing from the same table occurence as the portal?
You havent answered the previous question. In layout mode, check to make sure that table occurrence that you are using for your portal is the same one that is being referenced when you pass the parameter.