« Newer Entries   •   Older Entries »

An update for FileMaker Pro 11 and FileMaker Pro 11 Advanced was released today. You should download it to take advantage of all the changes and updated features:

New in FileMaker Pro 11.0v2

Changes in:

  • Field Definition
  • Recovery
  • Snapshot Link
  • Scripting
  • Quick Find
  • Value Lists
  • Printing (rotated text issue)
  • Runtime (Internet access issue; missing Microsoft Visual C++ libraries issue)
  • Plug-ins
  • General (empty merge variables issue; portal flicker (Windows), and others)
  • Excel Import (Japanese furigana issue)
  • IWP
  • xDBC

For detailed information read the release notes at the FileMaker Support pages. There you will find also links to the appropriate update files for the different FileMaker versions.

June 9th, 2010

As a developer you might need a timer in your database. In that case you might find this feature helpful. You can create timer, as many as you like. Use them for benchmarks, to log import and export times, or to keep track of user log-in times.

Stop Watch

Each timer works like a little stopwatch. You can …

  • start it,
  • stop it,
  • restart/stop it again,
  • read the elapsed time,
  • and reset/remove it.

This is accomplished with custom functions and a global variable:

  • timer( name; action )
  • param( key; value )
  • param.get( key; params )
  • param.delete( key; params )
  • $$timer

Read more …

April 20th, 2010

What is the simplest custom function with a purpose you can write in FileMaker?
The answer is a custom function with only one character – and that includes the function name and parameters.

The Power of One

My simplest custom function has only a name. And it is the shortest possible name, a single character. The character I choose is the underscore. The function does not expect any function parameters and calculates and returns nothing.

Function _( )
/* no content */

The custom function is so simple I had to add this comment here, otherwise my custom function box would look just odd.

Why is there no content in the function body? Or, a better question, what does the function do?

This function will return an empty string (“”). And this should give you a clue, how to use the function. You can use this function wherever you would use an empty string:

  • Check whether fields or variables are empty
  • Initialize or ‘delete’ variables
  • For Let functions returning nothing (used to set global variables)
  • For ‘optional’ parameters in custom function you do not want to fill
  • For evaluation expression to avoid excessive use of the escape character

This also explains why I choose the underscore for the name of this custom function. The underscore looks like a placeholder or something empty and therefore resembles best the purpose and meaning of the function.

Example of Use

Compare for empty value:

If( $value = _; ... )

Delete global variables and return nothing from a Let function:

Let( $$counter = _; _ )

Call a custom function with optional parameter and keep that parameter undefined. In this example the function myFunction expects three parameter, but the second and third parameter are optional and do not require any value. I cannot really skip these parameters in FileMaker, but with the underscore I can indicate, I do not assign a specific value to them.

myFunction( "Arnold"; _; _ )
myFunction( "Kegebein"; _; 1 )

Avoid excessive use of the escape character. Without my custom function you would have to use some escape characters. That makes it harder to read and understand the expression.

Evaluate( "Let( $$X = _; _ )" )
//--- Without the custom function:
Evaluate( "Let( $$X = \"\"; \"\" )" )

Almost no day goes by without me using this function.

April 6th, 2010

Working with random numbers in FileMaker

When you want random numbers, you can use FileMakers function random. It is a very simple function. It does not require any parameter and returns a number between 0 and 1. Of course, often the random numbers you are looking for do not belong to this narrow interval. You have to transform the value to match your target range.

random.interval

I wrote a little custom function to accomplish this transformation. The function expects two parameters, the lower (min) and the upper value (max) of the target interval.

random.interval( _min; _max )
Random * ( _max - _min ) + _min

This is very simple. But often you are looking for discrete values, like throwing some dice.

random.discrete

The next custom function will take care of that. As you can see, I do not only floor the random value. Because of the discrete nature of the return value, I adjust the interval limit accordingly.
This call will return the random values of a single die: random.discrete( 1; 6 ).

random.discrete( _min; _max )
Floor( Random * ( _max - _min + 1 ) ) + _min

Random is not Random

Be careful, though, with random numbers. In any real life situations random numbers are not evenly distributed. More often they follow a distribution called Normal distribution or Gauss distribution. The graph of the probability density function is bell-shaped. It has a peak at the mean, and is known as the Gaussian function or Bell curve.

Unfortunately, the FileMaker function Random returns only uniformly distributed random numbers. But mathematics offers a solution. There are actual multiple ways to convert uniformly distributed numbers to normal distributed numbers.
Read more …

April 1st, 2010

My blog celebrates its 1st birthday. One year ago I started with a long post, supposedly leaking early information about FileMaker Pro 10. At that time, the newest version FileMaker Pro 10 was out three months. A couple visitors read my post, got confused, got exited, and finally got it when they read the last line of the post that everything was just an April Fools’ joke.

But was it just a joke? I though about it more as a wish list or an suggestion for new features in FileMaker. Did it helped? At least some visitors had their fun reading the post. And I know, it got the attention at FileMaker Inc. It is up to you to decide, if any of my suggestions were picked up by FileMaker and used as inspiration for the new program. FileMaker Pro 11 is finally there. It offers many new features, many of them have not been on my published wish list (I never wrote about charts).

But some new things were not so far from my suggestions. The new Inspector for example was mentioned in my post – not under the name Inspector of course, but I extended the old Info box to offer the developer better access to change object attributes. And I said something about merge fields and the problem with the long names and therefore over-sized merge objects. FileMaker allows now to use Merge Variables, and these can be as short as a simple “$i”. So, am I responsible for these new features in FileMaker Pro 11? I do not think so. I rather like to think, that some people at FileMaker and I are thinking in the same direction.
Read more …

« Newer Entries   •   Older Entries »