Search Project Mgmt
Search FileMaker Blogs

Thank you for visiting the FileMaker Thoughts blog. I recently moved this content over from my blogger account. Hope you like it! When you get a chance, check out the centralized search feature for all the FileMaker blogs found along the right side panel. It is quite handy!


Tuesday
Sep022014

FileMaker Calculation Fields With Repetitions

From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer

WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

A calculation field can have a repeating storage option set for it just like a text, number, date, time, timestamp and container field.

Repeating fields are odd little things and I seldom use them anymore. Back before FileMaker 3, they were a workaround for the flat nature of FileMaker. According to the FileMaker wikipedia entry, FileMaker 3 rolled out in December 1995. So in the 13 + years since FileMaker went relational, repeating fields have been used as workarounds for things other than relationships (by experienced developers) and sometimes used instead of relationships (by inexperienced developers).

So there really is no way to say that repeating fields are used for this, that and the other. It is more like, “he/she is using repeating fields to do this, interesting”.

Calculations with repetitions are used primarily when interfacing with other repeating fields. This is so you have a clean calculation that extends what the standard repeating fields told you about a particular record. So if the standard field has 10 repetitions, your associated calculation will likely have 10 repetitions as well.

So in summary, a calculation can have a repeating storage option set for it, mainly so it can calculate results from other repeating fields accurately. You will generally run into this when an advanced developer is doing something “special”, when you are working on a very old file that hasn’t been modified in a long while or when a developer used a repeating field where they could have used a relationship portal.

© 2010 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. FileMaker Pro is the registered trademark of FileMaker Inc.

Tuesday
Sep022014

The FileMaker Pause / Resume Script Step

From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer

WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

Works like the pause button on a DVD player, you can setup this script step to pause a current running script. Paused scripts can even be given a defined time duration before they start running again.

HOW IT IS USED
Design - To pause long scripts at a given point to check how valid they are.

Troubleshooting - To place within a long script to see where a scripting error may occur.

FYI ... Both of the two examples, in many ways, this has been replaced by the script debugger found in FileMaker Advanced.

User Data Entry - To allow the user to do data entry in the middle of a script and then continue.

Splash Pages - To show a graphic, pause, then go to a data entry screen.

Allow Externals To Catch Up - When interfacing FileMaker with other applications via a script, the external source may take some time to finish running. So you can pause the FileMaker script a few seconds/minutes to allow the external operation to complete because you need the end result of it’s operation.

You have 3 different settings for the pause script step. The first is to pause the script indefinitely. So you would need to have the user hit the enter key on their keyboard, click the continue button (found in the status area) or run the script step again (depending on the buttons action, normally toggles the pause state to resume).

The next option is to pause the script for a time frame based upon a value in a field. This means you could calculate the pause duration or use a value placed into a global field. The last option is to hard code a time duration in hours, minutes and second for the pause duration.

COOL IMPLEMENTATIONS OF IT
I once had a very long and complicated script. I needed to do some troubleshooting so I used a combination of the pause script step and the speak script step. What I did was have FileMaker speak where it was in the script, then pause. After I would hit continue, it would go on until the next speak/pause combination. I did this way back in the FileMaker 4 and FileMaker 5 days. Now I use the Script Debugger feature in FileMaker Advanced, although the debugger doesn’t talk to me.

FYI...
In many cases, if you are relying on the pause script step to control the users navigation through your solution, you will want to disallow the user the ability to abort the script (User Abort is another script step).

Got To Know Factor - 8

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

Monday
Sep012014

FileMaker User Name vs FileMaker Account Name

From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer

WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

As a savvy FileMaker solution administrator, you will want to keep an eye on who is doing what within your FileMaker solution. FileMaker gives you two choices from where this information is gathered. Current User information comes either from the name that is logged into the operating system or from a field offered in the Application Preferences.

A user can choose to use a different name than their own in the FileMaker preferences. Right now on my computer, I could set my preference name to George W. Bush. Everything that I do from then on in the database, my user name would be George W. Bush. Also anyone using my computer and FileMaker would have a user name of George W. Bush. So in a multi-user environment, it is critical that each user has their name defined in the FileMaker preferences correctly.


See how easy it is to change my user name!

Some designers actually do security settings by the user name specified in the application preferences. They build scripts that branch if based upon what the Get(UserName) function tells them. THIS IS NOT VERY SECURE! For example, lets say someone puts a branch in a FileMaker navigation script. When the script runs, it goes to a special security area if Get(UserName) = "Jane Doe". For me to be Jane Doe, all I need to do is type that in my FileMaker application preferences.

I would have to recommend that every FileMaker solution that needs to be secured, perform a switch from capturing user name information to capturing account name to get more accurate information. That is if you switch your solution to every user having their own account name and password, which I highly recommend as well.

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

Sunday
Aug312014

Sorting A FileMaker Relationship

From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer

WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

In the bottom third of the define relationship operator box, you can see options for each table occurrence in that relationship. These settings include ... "Allow creation of records in this table via this relationship", "Delete related records in this table when a record is deleted in the other table" and Sort Records. The settings are on both sides because FileMaker relationships are bidirectional.

For the purpose of this discussion, we are looking at the "Sort Records" setting. This setting can work for you in at least two ways but many only think of the portal method.

The sort option when defining a relationship is used to have related records recognized in a defined order. Relationships sorting can be useful for ...

- defining what related information appears when you put a related field on a layout

- defining what related information is used in calculations using relationships

- defining what related record FileMaker will go to in a GTRR situation

- what order related records appear in a portal ... if the portal does not have it's own sort order

The sort dialog box for the related records is practically the same as the sort dialog box for records. The settings include ascending, descending or custom based on a value list for each related field you want to sort. This sort records setting can work for your portal or you can setup your portal settings individually. FYI ... before FileMaker 7, portals did not have their own sort options. They had to use the sort order defined in the relationship.

Relationship sorting is a feature to consider carefully before implementing. By default, a FileMaker relationship is sorted by the related records creation order. That means the related records that were created first are seen before any more recently created records. Choosing the sorting option can reverse this order or allow you to set your own order. Sounds pretty cool and this option can be very useful. The problem is ... as normally is the case ... when the databases start growing in size. When you go from record to record, you have to wait for the related records to sort. This can be very uncomfortable on large databases that are networked with many users.

REAL WORLD EXAMPLE: As a developer, you may be working with a copy of the FileMaker solution on your individual hard drive. You turn the relationship sorting option on and it doesn't appear to be too slow. After you have completed your design changes, you upload the files in the FileMaker solution to the main FileMaker server. The next day you begin getting complaints about how slow the database is behaving. This is because every user on the networked file is encountering the same default sorting routine. Speed is one thing when a database solution is run by one person on a local hard drive. Speed can be another thing when a database is being used by 50 people over an already stressed network connection.

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

Saturday
Aug302014

Exploring FileMaker Number Fields

From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer

WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

The number field format is normally used for fields that contain quantity related information. Quantity values are often used within calculations, particularly when reporting is involved. Examples of a quantity related value data could be... price, weight, space, quantity or height.

FYI ... If the data string is a number but not related to a quantity, a text field is usually chosen instead of a number field. Some examples of this are U.S. zip codes, phone numbers or the jersey numbers of a sports team.


A number field is designed to hold only one number, unless of course it is a repeating field ( which is a whole different kettle of fish ). When it comes to indexing, number fields will index the first 400 digits, which is quite a bit. We should mention that this is 400 digits in each direction of zero. So you can index 400 digits above the value of zero and you can index 400 digits below the value of zero.

Number fields can be searched upon, sorted, used in calculations or in summary fields. You can enter formatting into a number field but generally it is not necessary. While in layout mode, you can set up the field to show comma's, dollar signs, percent signs or more. If you enter formatting related characters in a number field, FileMaker will not penalize you for it. For example, if you enter in the dollar sign ( $ ) and format the number field to show the dollar sign, FileMaker will not show the dollar sign twice. You can setup the number field options by choosing number under the Format menu while in layout mode.

You can put text characters in a number field but almost all text characters are ignored by the index. Since text characters are ignored by the index, find / sort / relationship operations on a number field that have text within it, will not work. As far as those operations go, the text characters might as well not be there. So in other words, if a number field has " (512) 555-1212 Extension 12, FileMaker only sees 512555121212. If the number field has 2250 Ridgepoint Drive, Suite 1007, FileMaker sees only the numbers of 22501007.

TEXT CHARACTER IN A NUMBER FIELD EXCEPTIONS
A carriage return is one of the text characters that a number field will not accept because it would basically mean two numbers in one field and that is not possible. FileMaker will recognize a period character as a decimal point. The text character of a minus sign ( - ) in the front of a number would be seen as making the following digits a negative number.

There is a field validation option that can be used to make sure that text characters are not entered into number fields. However, validation can be defeated in some cases of scripting and importing of data.
=
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.