Setup

Setup Control Files

This process creates the two Control files that reference your solution files and all of the coding required to do the imports. All of the setup is automated so each time you click the button it starts with an empty control file and the setup process begins. To start, click the "Setup Control Files" button.

SetupControlFiles.png

Alerts

The setup process uses User Interface scripting to do it's work. This means that RefreshFM takes over the UI and clicks buttons and opens and closes windows. So you have to let go of the mouse and take your hands off the keyboard and just watch RefreshFM do it's work until it alerts you that it's complete.

This process is done via AppleScript on the Mac and WinAutomation on Windows. You don't need to do anything for this to happen, it's built into RefreshFM, but you may need to give permission to the application to let it work.

On the Mac, this happens via the Accessibility frameworks. The first time you run the process you may get a dialog about enabling access. On Mac OS 10.8 and earlier this is a single setting for each user called "Enable access for assistive devices" under the "Accessibility" system preference pane.

In Mac OS 10.9 and later, this is under the "Security & Privacy" system preference pane, on the "Privacy" tab, under "Accessibility". You will need to enable the checkbox for FileMaker Pro after entering your account password.

Other Windows

Because RefreshFM is controlling the interface, other windows that are open at the same time as RefreshFM may cause the setup process not to work. Things like the Data Viewer, layout Inspectors or plugin related toolbars should be closed before running the setup. If you have any errors during setup check for these first.

Also plugins that modify the FileMaker interface such as Developer Toolbox or MBS can interfere with our ability to locate the correct buttons to click.  Disable these and restart FMP to make sure they're not in the way.

Other Copies of FileMaker

Also make sure that you're only running one copy of FileMaker at a time so the process knows which version of the application to control.

Import Order 

The three choices for Import Order are :

  • Matching IDs ( default )
  • Matching Names
  • Creation Order

Matching IDs

This means that RefreshFM will work through any fields in the table, and use the internal field ID to match the old and new tables. To understand this : whenever you create a field, table, layout or script, FileMaker assigns it an internal ID that it uses to keep track of where it's used. This way you can have a calculation that references the "FullName" field, and change the name of the field to "Name" and everything just works.

So when you take a copy of your database, and develop in it, adding more fields, deleting some and renaming others, the list of fields change from old to new. But any field that exists in the old version will be able to find it's match in the new version by the ID.

So you can change the name of fields, or delete fields and add fields in your development version and it will still match up everything properly.

What you can't do is recreate the field list, or delete a field and then add it back with the same name. Both of those actions would change the internal ID and cause it to no longer match up.

So in normal development, Matching IDs is the best choice, and the default.

Matching Names

This version will work fine if you've recreated the field list completely, or if you never rename fields during development.

Creation Order

This choice will work if you've recreated the field list from an original "Creation Order" list, and then renamed some.

Adjusting the Import Order Manually

You can also make changes to the import after it's been created. Once the Setup process is complete, click the link to "Open New Control File" and go to Manage Scripts. Then open the "Import" script.

Just below the Else If step will be an Import step. Each of the Import steps will be set as per the option above. If you need to manually adjust the import order, click the Specifybutton :

Specify.png

This will open the Import Field Mapping dialog. The setting you need to review is the Arrange By setting.

ArrangeBy.png

Even though this dialog will say "Last Order" for the imports that RefreshFM sets up, it means "manual order".  We've generated a matched import order based on either the IDs or the names, and then FileMaker  stores that in the script and calls it last order.  So don't confuse last order with the Matching IDs or Matching Names options above, nor with the "Matching Names" option in this dialog.  

But if you want to make changes, choose an import order that suits your fields, or adjust the order manually as required.

Setup Process

When you click the button you are asked for an account and password to access the files. This can be a full access account, or it can just be something that has access to read and write data to the file.

The setup process will then run automatically. While it's running, don't touch the mouse or keyboard and it will alert you when it's finished. There are a lot of steps and lots of dialogs open and close, but RefreshFM should handle any of them that come up, so just wait till you get an alert to say it's complete.

Finished

Once complete you are presented with a list of Tables and Serial field names that were detected in the solution files. You should review the list and uncheck the "Included" box for any tables that don't need to be imported. These tables would be things used as control tables, or empty one record global tables, or perhaps anything with data that is delivered with the solution such as a postcodes lookup table.

Control Files

The two control files are shown at the bottom of the screen and can be opened, exported or updated manually from there if required.

You can also run the "Refresh Table List" button to update the tables based on any changes to the files at any time, but this process is included in the "Setup" process above.

 
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.