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.

Importing multiple files with one script.

Featured Replies

I would search but I don't know what to searth for. If anyone can tell me where to look I would be most appreciative.

I have a database of about 5 FM files with generate webpages. Called Sections, Pages, Images, Links, and Thumbnails. It works great. This database generates all the webpages for a website, maintains all the links, etc...

However, I have a bunch of different websites. I have one database, a folder with the five files, for each website. The problem arises when I write or modify a script, define a field, or change a layout. I want this change to take place on all of my website databases.

Does anyone know of an easy way to deal with this situation? I know the brute force way.

1) Duplicate the most up-to-date database.

2) Save all 5 files as clones

3) Duplicate the clone folder.

4) Import the records from each of the old database files into each of the clones of the duplicate folder.

5) Go to the next website and return to step 3, until I have done all the websites.

Obviously the excitement of that wears off quickly.

I figure this problem isn't uncommon and someone has probably already solved it. Please let me know.

Basically I want to be able to take the layouts, field definitions, and scripts from one group of FM files and and the records from another group of files, and put them together, by waving a wand.

One of the few weaknesses of FileMaker is how records are tied to layouts, field definitions, and scripts. Data shouldn't be hardwired to code. Comp Sci 101 smile.gif" border="0

I'd be tempted to redesign the entire system.

e.g.

One "master" file, say, sites.fp5, which would store "global" parameters for each web site as well as a primary relationship key for each web site

Your content files, i.e. Sections, Pages, Images, Links, and Thumbnails, which would store the appropriate data for all of the web sites as well as the foreign relationship key for the site in sites.fp5

If you have the time and ability, this is probably the best route to take for long-term sanity.

  • 2 weeks later...
  • Author

I had thought of something similar, but your Master File concept is simpler than what I had envisioned. Thanks. I will consider it.

In the meantime, I have implemented a system which works but is a bit fragile, I am afraid.

In each of the five files I have put 3 scripts.

1) Clone Me To the Output Folder

2) Export My Records to the Data Folder

3) Import All Records from the Data Folder

Then I have a Controller.fp5 file whose job is simply to call external scripts.

To give database B all the layouts, fields and scripts of database A.

Controller.fp2

1) calls Clone Me on all five files of A

2) calls Exports Me on all five files of B

3) calls Import on all five files of Output.

(I use Troi File plug-in for various file/folder existence checks etc)

Then in the Output folder is the database which has the records of B but the layouts, field def's and scripts of A

Create an account or sign in to comment

Important Information

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

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.