Jump to content

Using globals as variables w/o relationships?


RWX
 Share

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

Recommended Posts

In the past I've usually connected all of my solutions' files to a "variables" file where every file relates back to the variables file. The variables file contains a single record and a bunch of globals (the variables). Not uncommon.

Here's my question regarding FM 7: is it possible to do this without relationships in multi-table files? It seems that it is. In other words, can I create a Variables table, not relate it to anything, and still access its global fields from different parts of a multi-table solution? I just tried it and it seems to work.

-Rob

Version: Developer v7

Platform: Mac OS X Panther

Link to comment
Share on other sites

Yes you can but you need to remember in mult-user environment w/ server globals are not preserved. You will need to load the globals before you host the file..

You might consider a table of preferences/variables. non-global fields then this is where your prefs are stored. Then in your opening script set the globals that can be used solution-wide.

Link to comment
Share on other sites

I believe that you can access global fields in this way without an explicit relationship. Only global fields though.

The signle-record prefs file/table technique is now looking pretty ugly. There needs to be a separate relationship to it from each table. Not that the number of relationships is any different from in FMP6, but when you see all those occurrences of the Prefs table in the relationship-view-diagram-GUI-thing, each with a slightly different name... it makes me wish for a non-graphical alternative of listing the relationships.

Exciting though isn't it! It's really a whole new program...

Link to comment
Share on other sites

What do you mean, globals are not preserved with server? Between logins? This Variables table is basically temporary storage, a collection of global fields to be used by scripts. It should be re-initialized each time the user logs in. It's basically just a central location to store scratch information, rather than having globals in each table.

Preference information (if there is any) will be stored in a Users table (and loaded as needed).

-Rob

Version: Developer v7

Platform: Mac OS X Panther

Link to comment
Share on other sites

Rob.

If that is your design principle that will be fine. But if you intend to use the globals to store company address. Or graphics that you wish to maintain these global fields need to be populated in single user. and not hosted. If this information changes you need to take it off server and open it locally to preserve the globals.

There is another thread in this forum on the topic..

Link to comment
Share on other sites

This topic is 6511 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
 Share

×
×
  • Create New...

Important Information

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