That's a really general request. Can you narrow it down a bit?
What do you want to export and why? (sometimes people want to export data when other methods will work better.)
What do you want to import and why?
Do you need to do this manually by selecting menu options or automatically in a script?
What version of FileMaker are you using?
What's your experience level with FileMaker and similar database systems?
1. I want to be able to export or import full records, ie. so that the said record could go into another user's database and be used, added to. I'm aware that there could be problems with ID field numbers of records spread across several tables being the same as those on different records in the DB doing the importing.
2. Method: Scripted. I'd guess I'd use 'checkbox' buttons that you have previously given examples of.
3. FM: v14
4. My experience: I can script, am trying SQL, relate tables but will also still dutifully trip over basic concepts!!
Sorry, but my crystal ball is still out for repair. All I know about what you are requesting is what you tell me in this one thread in the forum.
1) are you exporting to and importing from FileMaker files?
a) Are you trying to move data from one file to another when both files are accessible at the same time? (Then no export is needed. It can all be done as an import.)
You still haven't said why you want to do this. This can be a very important question to answer at this point.
2) what role would "check box buttons" play in this process? To select which records to export?
I'm aware that there could be problems with ID field numbers of records spread across several tables being the same as those on different records in the DB doing the importing.
That may not be any problem at all depending on why you want to do this and the design of your database. You can also set up a text field to auto-enter a calculation: Get ( UUID ) and then each record will have a unique ID even when created in different tables or different files.
1. Yes importing from /exporting to FM files:
- The files will be initially standalone files used by different users who need to exchange patient records.
2. Checkbox selection was to permit users to decide which patient records they wanted to export/import.
3. UUID: Is this something I'd put in the Patient table (top level) or every table from/ to which data is transferred?
3. Given what you describe, you'd want to use a UUID in every table that is "synched" back to the central file.
1) Does this mean that you have a single hosted database to which you want to export your data?
Will your users be using FileMaker Pro, FileMaker GO on iOS devices or both?
2) I may be misunderstanding what you meant by a "check box button", but if these are stand alone, single user files, you only need a standard single value check box field. The "button that simulates a check box" option is a method to solve a number of issues that don't seem to apply here--such as two users of the same file making selections at the same time to build a list of selected items that must be different for each user.
I must note that there are at least 3 third party "synch" tools designed for this type of action. You may find it better to use one of them than to "re-invent the wheel".
There's also a PDF on syncing iOS devices back to a central file from FileMaker: http://www.filemaker.com/solutions/ios/docs/fmi_guide_sync_en.pdf
The basics for Importing work the same for a manual import as well as a script so if you can set up a manual Import Records action from the File menu, you are already using most of the same dialog boxes that you'd use to set it up in a script.
To import data from Table A into Table B manually;
In the file with Table B, go to a layout based on Table B. (This is the one step not required in scripted imports).
Select import Records from the File menu
In the open file dialog that appears, find and select the file that contains Table A. Table A can be a table in the same file as B or in a different file. The steps for selecting the file are the same.
From the list of tables in your source file (the file from which you are importing), select Table A as your source file.
Starting from a layout based on Table B has already selected Table B as the target table. If this were a script step, you'd select Table B as the target table in the Import Mapping dialog box that is now open.
Now select the options for your import. Assuming that you just want to add new records--the default setting, you just align the fields in table B to the fields in Table A. If the field names are the same in both tales, theres a matching field names option that makes this easy.
Now Click Import. You have a dialog with a few last options, but i you are "synching" data back to a central file, neither of these options should be selected.
In a scripted solution, the process and dialogs are basically the same, but you have the option to "hardwire" the script to a source file name and location rather than having the script stop and ask the user to select a file. Asking the user to select a file, exposes the user to the complex appearing Import Mapping dialog, but a more sophisticated scripted approach can use a container field to ask the user to select the source file and then the script can extract a file path to the file from the container field and use that as the file reference for the import.
Thank you for such a detailed response; I'll spend a bit of time processing that, but
3. UUID: Are these additional ID fields or instead of pkIDs?
1. Devices: Both though mostly Runtimes or iOS Go. Few people will have FM Pro.
Your pkID would be defined as a text field with Get ( UUID ) as its auto-enter calculation. You can also specify "unique values" for this in field options as a way to still get the "single line connector" in the relationships graph that you normally expect for a pk field.