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.

How to keep 4 tables consistent

Featured Replies

I have three different websites that I feed from my Filemaker Database. The website feeds require specific column names in order to import correctly. Thus I need to have 4 tables because some of the column names (field names) have the same name across different websites but different data.

I have one main table that has all the pertinent data and a Unique Identifier called "Model Number"

I have an ebay export table

I have an Amazon export table

I have a Website export table

Each table has a relationship back to the main table based on Model Number. Different fields will pull in the data they need when Model Number matches.

My problem is how do I keep the three other tables up to date with the model number field in the main table. For example, I add a new product to the main table, how do I make sure that model number gets added to the other 3 automatically?

Can I run a script that works in the background to do this on the server? OR, is there a much better way? Is there some sort of compare script step or function that will allow me to do this?

What is the export format?

  • Author

Because I need the export format to retain the field names as "column headers" I am exporting as a .mer (merge) file. I then rename this .csv and upload the feed.

i haven't found anything else that retains the field names

Keeping 4 tables synced just for the export does not seem like a good idea. Fortunately, there are other options:

1. Export as XML, using 3 different style-sheets.

2. Export the file as .csv and use Applescript to add the field names.

3. Keep the 4 tables, but sync them only when exporting, as part of the exporting script.

  • Author

Option 3 (though 1 and 2 sound better) - How would I sync them? Thank you in advance.

Jeffrey

The primitive method: in the source table, show all records (or find the records you want to export). In the target table, show all records, delete all records, import from source table.

This can be smartened up by importing only new records (import with matching on ID). But then you need to make sure that existing records are deleted when the original is deleted in the source table (this can be done in the relationship's definition).

Note that with the primitive method, you don't need any relationships.

  • Author

Can I import from a table within the main file. I only have one FM file with multiple tables within.

Sure, you can import from another table in the same file.

  • Author

how do I import from one active file back into the same active file

Sorry, I do not understand the question.

Can I run a script that works in the background to do this on the server?

Note that, as far as I can tell, you can't (*yet) use server-side script if import is involved. This does not mean you should dump the idea of using imports; only that you can't fire it with hands-off capability using FMS.

*simple guess that FM will remove this limitation in the future.

Missed the point about server - thanks for catching that. But perhaps that was related to the question about synchronizing the 4 tables, while the actual exports are user-initiated?

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.