September 28th, 2009

The basis of each computer operation is binary logic. Zeros and ones are transformed with simple operations into zeros and ones again. FileMaker is hiding its binary roots very successfully. Only now and then the user can catch a glimpse of it. Some custom functions use binary elements, e. g. Get( ActiveModifierKeys ). And of course you can build logical expressions for If and Case functions, using and/or/not operators, but every value is used as a single logical value. Every number different from 0 is taken as the logical value 1 (True). There is no difference between 1 and 999, for FileMaker both values are a logical 1.

Bitwise operation

I need bitwise opertion for my projects. You might run into the same situation, perhaps managing a collection of flags. Each bit represents a flag. To set flags or ready the status of one or more flags requires binary calculations. In that case you have to take whatever FileMaker has to offer and build the missing parts yourself.

I wrote some custom functions to provide basic logical operations: bit.not, bit.and, bit.or, and bit.xor. Two more functions complete the package; bit.isSet for bit testing and bit.bitset to display decimal numbers in their binary representation.
Read more …

August 22nd, 2009

In my projects, I often use modifier keys (SHIFT, CTRL, …) to offer the user additional features. For example, I use buttons to go to the previous or next record. This behavior changes, when the CTRL key is pressed. Now, the buttons redirect to the first or last record.

A function from my Custom Function Vault makes it easy to work with modifier keys. It creates variables, representing the state of the modifier keys:

  • get.modifierKeys()

Read more …

This article is part of my series Custom Function Vault. Here I describe miscellaneous custom functions to verify required script parameters.

  • param.script.check()
  • text.between( text; start; end; type )
  • trim.all( text; trimChr )
  • var.assign( definition )

Read more …

June 24th, 2009

This article is part of my series Custom Function Vault. Here I describe a custom function for working with parameters.

  • param.assign( params )

Read more …

June 24th, 2009

This article is part of my series Custom Function Vault. Here I describe custom functions for managing (script) parameters.

  • param( key; value )
  • param.get( key; params )

Read more …