Field Tips

From Fmfaq

Jump to: navigation, search

Go back to Quick Tips

Contents

Checkbox & Radio button storage

It's critical to know that fields specified as checkboxes (or even radio buttons, popup menus or lists) store their multiple values separated by a return character. Try this. Make a field a checkbox field and then make a duplicate of that field. Set the duplicate to be a standard field then watch what happens when you check more than one option. This allows for many of the cool interface techniques that use multi-key relationships!

A New Form of Auto-Enter Lookup - FMP7 and up

The standard Lookup Auto-Enter looks up data from another file or table via a relationship and it changes if changes are made in the match field. E.g. Customer name looked up from CustomerID#, change the customer ID# and the name changes.

Now using a calculated Auto-Enter you can do a form of lookup which looks the same as the above but doesn't change with the match field unless you clear the name field first. You can also apply format calculations to changes to the field. A simple example of such a Auto-Enter Calculation

If(IsEmpty(Name);Lookup(Customer::Name);Name)

Uncheck - Do not replace existing value for field (if any). This calculation puts in a default name by Lookup and if you change it your change is sticky. On the other hand you can empty the field and the lookup will be performed again. The sky's the limit the second part of the IF can be any calculation

--SlimJim 15:22, 4 Aug 2005 (CDT)

The terms Storage, Index and Global Storage

Sometimes, FileMaker documentation uses a number of terms to mean the same things in FileMaker software. These multiple terms can be a source of confusion for even novice developers.

One such example are the words "Storage" and "Index". You'll find a script step named "Insert from Index" as well as the button labeled "Storage options..." found in the Specify Calculation dialog box. It so happens that these are both the same thing - the later should probably read "Index options...". They simply refer to the storage of the data into the database index. The index is similar to the index found in most any book. It's a condensed set of pointers to where the real information is. When you click on the "Storage options..." button, you're making changes to how the index is going to be treated - for that specific field.

When viewing the Storage Options dialog box you'll see the new FileMaker 7 option of setting a calculation to use global storage. Being able to have global calculations is a new feature in version 7. However, in the time since FileMaker 7 was released, I've rarely found the need to use global storage for a calculated value. It's almost always better to choose the option to "Do not store calculation results...". This is what causes FileMaker to update the display of values in calculated fields that are not stored (and also the option you want to check whenever working with Get() functions ).

As far as the Indexing options of None, Minimal and All - I'll simply suggest that you check the box to Automatically create indexes as needed. Unless you know you don't want the field to be indexed, this is the easiest thing to do.
Contributed by Matt

Status or Get Function Storage

Note: FileMaker 7 changed the name of Status() functions to Get() functions.

When working with Get functions (formerly known as Status functions) you need to remember that most all Get functions are "display type" functions. Meaning these functions will display some type of value which updates based on associated criteria. So, while Get functions can be used within calculations, they will only display properly when set to be unstored. This means you can't use Status functions reliably within relationships. The one exception to this rule is Get( CurrentRecordID ) which is an internal ID value that FileMaker assigned to a record.

Personal tools