FileMaker Script

from Wikipedia, the free encyclopedia
FileMaker Script
logo
Scripting language
Basic data
Publishing year: 1993
Developer: FileMaker Inc
Current  version : 14   (May 12, 2015)
Typing : weak , dynamic
Operating system : Mac OS X , Apple iOS , Windows
License : proprietary
help.filemaker.com

FileMaker Script is a scripting language from the US company FileMaker, Inc. It is part of the FileMaker database system . FileMaker Script is used to control and automate applications within the FileMaker database environment.

features

Although FileMaker is a database system, the FileMaker Script programming language is not primarily used to formulate database queries, but rather it is a kind of macro language with which complete processes in database Control applications.

This was clearly shown in the earlier versions of the database system, where the scripts had to be clicked together from a pre-defined list of commands. In the meantime, the language, both in terms of the scope of commands and the programming concept, has been significantly expanded and has become more flexible.

The programming takes place within the so-called script work area. This provides a central editor window for all scripts in a FileMaker database file. There is also the formula editor, in which references to database fields can be entered and any complex calculations can be programmed. The formula editor is used wherever parameters are used within scripts.

All scripts exist as proprietary objects within a database file together with the database schema, the user interface of the application and the actual data. The concept provides that sub-scripts can also be called in other database files via file references.

Different methods are available for calling scripts:

  • Call up via a menu entry
  • Call via an object defined as a button in the user interface of the application
  • Another script called
  • Call via an event trigger
  • Call via a server schedule
  • Call via external automation triggers (e.g. from AppleScript )

Scripts within FileMaker can be executed in the locally open client file, or as batch processing on a FileMaker Server.

The vast majority of FileMaker Script commands run platform-neutral on all clients under Mac OS X, Windows and iOS. Many commands are also supported under WebDirect in the browser.

In the FileMaker Pro Advanced variant, the database system offers additional programming aids. With the Script Debugger, scripts can be executed in single-step mode at runtime. Variable contents and data fields are displayed in a separate window.

Script parameters

A script parameter in the form of a text string is available for transferring data to the script. The text string can contain multiple values ​​in the form of a list separated by line breaks.

When the script is terminated, a script result can be returned to the calling script in the same way. Here, too, the transfer takes place in the form of a text string.

variables

Variables are of no type and are used in three different forms:

  • $ Var = local variable (within the same script)
  • $$ Var = global variable (within the same file)
  • Var = local variable (parameters within a CustomFunction or within a SetVars instruction)

Data types

Based on the types available in the database schema, FileMaker Script uses the following types of data:

  • text
  • number
  • date
  • time
  • time stamp
  • Media (blob)

It is possible to address data types in the form of a one-dimensional array - called repeating fields in FileMaker Script.

Control structures

FileMaker Script knows the following control structures:

  • If -> end (if)
  • If -> Else -> End (if)
  • If -> Else, If -> End (if)
  • Loop (start) -> loop (end)
  • Loop (start) -> exit loop if -> loop (end)
  • Exit current script
  • Cancel all scripts

literature

  • Horst-Dieter Radke: FileMaker Pro 12: The basic book: Developing and managing databases . SmartBooks, 2013, ISBN 978-3-944165-00-4 .
  • Susan Prosser, Stuart Gripman: FileMaker Pro 14: The Missing Manual . O'Reilly, 2015, ISBN 978-1-4919-1748-0 (English).

Web links