Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Copying An Entire Record Between Databases


This topic is 7565 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi Guys

I have what is hopefully a simple question. I have two databases, an enquiry database and a client database. When an enquirer becomes a client I want to copy all the information I have on them from the enquiry database to the client database without having to copy and paste each field as I am currently doing.

Ideally it would be great to click one button in the enquiry database that creates a new record in the client database and copies all the info over, or, alternatively, the button is in the client database and when clicked will import the info from the enquiry database.

Any suggestions would be greatly received.

Posted

Import is easier. Omit all other records in the Inquiry file/table, then from the Client file/table, import from Inquiry, matching fields as needed.

Posted

Here's a quick and dirty version of a solution. I added a relationship between the databases in order to prevent duplicate entries of the same "Enquirer" record into the "Customer" database.

If you don't want to use the relationship, it will work fine without the relationship, with a simple edit.

Edit the only script in "Enquirer". Take out everything but the lines between Else...End IF.

Good Luck!

Paul

CustomerImport.zip

Posted

I understand the omitting of all but the required record in the enquiry database and then going back to the client database to create a new record and do the import, but how do I specify from within the client database which record is to be imported?

The client database (importing) will not recognise that the enquiry database has omitted fields will it? Won't is see ALL the records in the database and not just the omitted one I have selected for import?

Cheers.

Posted

Thanks for your reply Paul, but I do not understand what you are saying.

What are your references to 'a simple edit'? Edit of what? And what do you mean by 'Edit the only script in "Enquirer". Take out everything but the lines between Else...End IF.'?

What only script? And where does the Else...End If come from?

Confused! Are we talking about the same thing?

Cheers.

Posted

For the import:

In FM7, if the file that you're importing from is closed, it will import all records, otherwise it will import the found set. To limit the found set to the current record you can run a script that has this:

Show All Records

Omit Record

Show Omitted Only

Posted

Nelly said:

Thanks for your reply Paul, but I do not understand what you are saying.

What are your references to 'a simple edit'? Edit of what? And what do you mean by 'Edit the only script in "Enquirer". Take out everything but the lines between Else...End IF.'?

Sorry, life interrupted. References to a simple edit and the only script in "Enquire" refer to the fact that (in the previous attachment) I answered a question that you had not asked, so you may need to edit the "solution" crazy.gif.

Aside from the function you originally requested, I added a check to make sure that the record being added to the "Customer" database did not already exist. In doing so, I created a relationship and added part of a script. You can get the functionality you requested without the added feature, though.

If you don't want to check to see if a client exists before you copy (import) the record from the "Enquire" to the "Customer" database, here is the "minor edit" that will eliminate that function:

[color:"Blue"]In the "Enquire" database, edit the script called "Convert_to_Customer". Delete Script lines 1-5 and 12. This will only leave the lines that occur between the "Else" and "End If" lines in the script. Sorry for the sloppy shorthand (Else...End If)

Paul

This topic is 7565 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.