|
|
MIGRATION
Build a Seamless FileMaker Pro Upgrade Path
Let users upgrade FileMaker Pro on their own, without involving a developer, using this simple technique.
UNLOCKED -- This article is provided to subscribers of FILEMAKER ADVISOR or DATABASED ADVISOR or FILEMAKER ADVISOR. To subscribe or renew, go to Advisor Store.
If you've been working with FileMaker Pro for several years, you know how much it has evolved and improved from version to version. But with FileMaker Pro 7 having multiple tables in one file, it has, in some ways become much more complex to upgrade. This article will show you a seamless way to upgrade that only requires users to click on two buttons.
To move data from one version to another, you have to find all the records in the original file, then import them from table to table using view by matching names. That's fine if you only have a table or two to import, but if you have many tables, it becomes a lot of work and there's always the risk of overlooking or forgetting to import data from one or more of those tables.
For the example I discuss in this article, I'll assume you have a single file with multiple tables. I always use a serial number field to create a unique primary key so I don't have to worry about updating the serial numbers when I import data from an old version to a new one. See the sidebar "Updating Serial Numbers" for a script step to do the work for you.
The routine requires two scripts and one global field. Your solution sets the global field when you run the first script (which prepares the original file for the upgrade) and checks that the user isn't trying to import data into the same file he's currently using. In other words, you set the original file to 1 and the new file will have that field empty; when the import script checks the field value and sees that it has a 1 in it, it knows the user isn't importing into the correct file.
You'll need one layout for each table in your solution; those layouts don't have to have any fields or data. You only need them so you can go to the table occurrence.
Updating Serial Numbers
In each table that has a serial number that requires updating, create a summary field called Max_Serial# which is simply the max of the serial number.
For each of those tables, add this line of code to the upgrade script:
SetNextSerialValue(TableName::Serial_#,Max_Serial# + 1)
This script step doesn't change or replace any field data; it just changes the Next Serial Number in the Field Options dialog for that field.
Michael Rochard was born in England and has been a full time professional FileMaker developer since 1987. He co-founded the first FileMaker-only consultancy in the UK. Michael has worked with many Fortune 500 companies and has developed solutions for virtually every industry. He specializes in highly visual intuitive interfaces. Michael works as a consultant for Excelisys but also has his own company, TimeGain Software, which provides Web site design, graphic design, and business development services in addition to FileMaker development. rochard@timegainsoftware.com or rochard@excelisys.com
Keyword Tags: FileMaker, FileMaker Development, FileMaker FileMaker Pro, FileMaker Solutions, Migration
ADVISORAMA Examine the word impossible closely, and you'll find that most of it is possible.
|
ARTICLE INFO
Web Edition: 2007 Week 30, Doc #19106Print Edition: August/September 2007, Page 40
ARTICLE LOCKED
|
FileMaker Advisor Sponsors
|

Read the advanced guide to creating custom business database solutions with FileMaker software. Subscribe now to gain access to all the archives and downloads.![]() 
Learn the fundamentals of using FileMaker Pro software. Every issue gives you step-by-step instructions on creating the databases you need. Subscribe now!![]()  ![]()
![]()

See exactly how to do it, step-by-step, in Advisor Academy CDs created by the top experts. Click to see what you can learn right now.![]() 
Keep up! Hot News, How-To, Tips & Tricks, Expert Advice, and more. Click to request your's free.![]()  ![]()

What direction are you going with your business? Advisor Guides are packed with the answers you need to work smarter. Can you afford to fall behind?![]() 
Submit your tips, techniques and advice and let Advisor promote your business and build your career. Show the world what you know!![]()  ![]()
|
|