Hi, I need to create an automated way to export the user data out of all the data tables and then import it back into (a modified version of) the same template. This is to facilitate software upgrades for my customers. I have 1000s of customers using the software I develop.
To be clear, I just want to export the data the users have entered... none of the UI data needed for the charts, calendar, etc... Just the contact, projects, invoices, etc.
In previous solutions I've done this by creating separate scripts that export the data from each table into generic FileMaker Pro format files. Then I create a single master script that calls all of these individual scripts to execute the entire export with one button click.
I followed this export script up with matching import scripts that import all of the exported data files back into the (modified) template with a single button click as well. This makes upgrades simple for my users.
Is there a slick way to automate this that you know of? The primary issue is making sure the k_prime fields are reset to auto-enter new serial numbers that are not duplicates, i.e. one number sequentially higher than any of the data that is imported.
I've been very successful with this in the past, but must admit I'm still more familiar with completing the task using multi-file single-table solutions than with this single file multi-table solution. The number of layouts and TOs do to it in this single file solution the way I used to do it in my multi-file solution seems quite daunting.
Thanks in advance. -Charlie
Automated Export/Import Script for Upgrades
3 posts
• Page 1 of 1
Posts: 47
Joined: Sun Sep 02, 2007 9:57 am |
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Hey Charlie,
You likely have more experience with these kinds of automated upgrades than I do, but I've written a few for customers who have vertical market apps. As you suggested, you do this in a multi-table app just as you do in a multi-file app, but there are some things I can suggest in addition to what you're already planning. - You can use the "Set Next Serial Value" script step to reset the next serial number after you complete the imports in each table. - If you're not letting your users define fields in the solution you can probably import directly from their old file without exporting from the file's first. - Corn Walker suggested a wicked cool technique to me the other day for doing all this: he creates a file reference to the "old" file in the new one, creating a set of simple table occurrences just for migrating to the new version. Then when a user renames the old file as he's instructed, the table occurrences resolve so he can have layouts based on the "old" file in the new one, build his found sets, and import data all from within the new file. He creates two file paths for this file reference so that the TOs resolve to the new file if the old one can't be found and users never get a "Can't find" dialog which they could mistakenly point an another file. Pretty slick. HTH. Be sure to post any refinements to all this you may come up with; I'd be interested. John Sindelar
SeedCode |
Posts: 47
Joined: Sun Sep 02, 2007 9:57 am |
Cool John, thanks. Once I get the whole thing converted into the SeedCode Complete single file solution Corn's method sounds awesome. I think I'll probably build it out as an exported backup file still though, I've found stripping all the complicated start up scripts and calc fields out of the data file has proven handy on more than one occasion during upgrades, especially when a major FileMaker upgrade occurs again like the one between 6 and 7. It also helps my users backup their data more often, and acts as a poor man's data-sharing tool on occasion as well.
I do use that GetNextSerialNumber call already for sure, it's very handy. Thanks again! |
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 3 guests