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.

Featured Replies

Apologies if this discovery has already been posted by someone; I searched, and believe it has not.

Anyway, I've discovered that -- contrary to what is stated in FileMaker 7 Help, as well as my current, beloved FM bible "Special Edition Using FM 7" -- the "Replace Field Contents" script step does not require the specified field to be on the current layout (i.e., the one from which the script step is performed). The current layout must apparently be either based on the base table of the specified field or a related table occurence, to avoid an error, but in neither case does the field need to actually be on the (or any!) layout. In this way the behavior of this script step is similar to Set Field, which also does not require the field to be on the layout and is highly valued for that fact. (I think there'll be little disagreement with that statement!) But wait there's more...

If the current layout is based on the specified field's table, then the replace operation is performed on all records in the found set (just as expected, except for the part about the field not needing to be present).

If, however, the current layout (call it 'B') is based on a related table occurence 'B' (again with no requirement for the field itself to be shown), then the replace operation is performed on all records in table 'A' (i.e., the specified field's table) that are related to records in the current found set in 'B', regardless of their inclusion in any particular found set in the field's own table 'A'. (If someone can translate into a clearer description, please be my guest.)

It's a bit confusing, a bit counter intuitive, but very nifty none-the-less, and will definitely change the way I think about using "Replace Field Contents" in a script.

I haven't compared this to the behavior in FM 5 / 5.5 / 6, although I beleive those versions did indeed require the specified field to be on the layout. If so, this is an interesting behavior change, yet to even be noticed by the folks who write the Help files.

Old news. That was one of the basic changes announced with Filemaker 7. The Help file mistake is a surprise.

  • 3 weeks later...

Thanks Mark, I never realised that.

Peter

  • 1 month later...

Interesting.

Question: Does this mean that there is a quick 2-step to duplicate the primary keys in one table to another?

Let's say you have table A, and you want to make sure that table B has a one-one relationship with table A. Could you just do this?

Go to layout (table A)

Find (find for Key_A::Key_B = null)

ReplaceFieldContents (Key_A::Key_B; Key_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.