Search Project Mgmt
Search FileMaker Blogs
« FILEMAKER: Storage:Repeating Fields | Main | FILEMAKER: Introducing Field Storage Options »
Saturday
May122007

FILEMAKER: Storage: Global Field Storage Options

From Dwayne Wright - www.dwaynewright.com

The global field option is used to contain a single literal value for all records in a FileMaker table. Any field that has data stored globally has one value and it can be viewed no matter where you are within a FileMaker table.

PLEASE NOTE: Data in global fields can be passed from one table to another ... and not have a relationship. This is different than the way FileMaker 6 did things, which required some sort of valid relationship to pass data to a global field in another file. It is still common practice, however, to use a relationship when working with global field data within two or more tables.

FYI... I have seen a least one occasion where global field data WOULD NOT pass between tables unless there was a valid relationship. The only time that I have seen it fail is when the user is working with FileMaker via a web browser using a method called Instant Web Publishing. So if you are thinking about web enabling your database, that is one thing to keep in the back of your mind.

Fields with the global option can be edited directly on a layout or via a script. Global fields work about the same as normal entry fields in that you can click inside them, cut, paste and add new data.

In FileMaker 6 and earlier, global fields were a field format. In FileMaker 7 and later, global fields are no longer a field format but a field storage option. If I mention a global field, I mean a regular field with a global storage setting.

Fields can be accessed by opening the Define Database dialog box (from under the File menu) and then clicking the Fields tab. Click the field you want to make a global and click the options button. The third tab should say storage. Click it and you can see where the check box is for making the field a global storage field. All types of fields can be setup to be a global except for summary fields ( which usually returns a static value, just like a globally stored value does ). Some examples of data that could be in a global field

Field Name: Local Tax Rate
Data: 8.25%

Field Name: Company Logo (picture)
Data: The graphic of your company logo for letterheads and such

Usually a field with global storage is set at a particular value for use in a calculation or for use in a script. The setting of a global value can be done via end user data entry but in most cases it is done via a FileMaker script. This allows you to use a global field like a programmer uses a variable. Enter or set in a fresh value and it will immediately reflect on all records.

Finally, let’s cover how fields with global storage behave in networked FileMaker settings. In these cases the field behaves like a local global for each user. One user on the network cannot see what is in another users global field. By default, the global will contain the data it had when last closed in single user mode. The global field for a networked user will contain unique data, only for that user and only during that network session. When a networked user closes a file with global fields, none of the data in that global will be saved for the next session.

PLEASE NOTE: It’s a common technique of FileMaker developers to put a small g in front of the names of Global fields. This way you can find and identify them, when you have a large list of fields.

=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2007 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.