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.

Fm7 Scripting and tables

Featured Replies

I've been toying around with FM7 for a little bit now, and I'm a little confused about the way scripting is in Fm7...

If I'm running a script that effects two tables, is the only way to switch the scope by using a Go To Layout (for Set Field etc)? Is there another way I haven't found yet?

P.S. FileMaker 7 is a great great improvment, I've been excited since I saw the technical preview. FM 6 and below was a pain i the neck!

Version: v7.x

This has got me too Eric. I think the Go to Layout is the only way.

There is no "Get (TableName)" function either, so a defensive script writer may have to explicitly put Go To Layout steps in all scripts that work with fields,

At least that's what I'm thinking at this point (and doing).

  • Author

There is the Get(ActiveFieldTableName), which returns the name of the table of the current fields, kind of close, but still not that best.

Also, the Get(LayoutName) might help. If you name your layouts with someone like TABLENAME-DESCRIPTION. Then use LeftWords(Get(LayoutName),1), you'd have your table name. Could even use Developer to make your own custom function now!

Or, as i just found, could just use the Get(LayoutTableName), which returns the current layouts' table.

Vaughan said:

This has got me too Eric. I think the Go to Layout is the only way.

There is no "Get (TableName)" function either, so a defensive script writer may have to explicitly put Go To Layout steps in all scripts that work with fields,

At least that's what I'm thinking at this point (and doing).

For SetField couldn't you just use SetField[ TO::Field Name, Value]?

  • Author

Its not so much for Set Field, but more for Go To Record [First], which tables' record does it go to? the table of the current layout.

RalphL said:

For SetField couldn't you just use SetField[ TO::Field Name, Value]?

I have a file with 3 tables and a layout for each with buttons First, Prev, Next & Last. One set of scripts works with any layout and stays in that layout. I also have a set of buttons that moves between the layouts using one script. Does this answer your question?

  • Author

Kinda, thats not what I'm getting at.

Having, say, Go To Record[] relative to the table your on is great. Though if you doing a more complex script were you say find records in another table/layout and go through them one by and add data to the original layout/table, you'll have use Go To Layout in between all the steps.

RalphL said:

I have a file with 3 tables and a layout for each with buttons First, Prev, Next & Last. One set of scripts works with any layout and stays in that layout. I also have a set of buttons that moves between the layouts using one script. Does this answer your question?

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.