Jump to content

Fm7 Scripting and tables


This topic is 7307 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This topic is 7307 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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