Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Copying An Entire Record Between Databases

Featured Replies

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.

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.

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

  • Author

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.

  • Author

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.

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

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

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.