Skip links

Variable

FileMaker Variable

What is a variable in FileMaker?

Under a Variable In FileMaker databases, a variable is an element in the formula or script editor that can be used to save data temporarily. A variable is identified by the dollar sign $. FileMaker distinguishes between local and global variables, whereby local variables are identified with one dollar sign ($variable) and global variables with two dollar signs ($$variable). Variables are extremely flexible and can store almost all field contents, including of course media contents from container fields.

Add a new variable in a script

To add a new variable in a FileMaker script, add the command Set variable [] into your script, which you can enter in the [Control] find.

Set options for variables

Enter under [Name] enter a name for your variable and define the variable as either a local or global variable. Under [Value] to enter any value for the variable. By clicking on the [Specify...] opens the formula editor. Under [Repeat] you can optionally define the number of repetitions for the new variable.

Adding a new variable to a formula

In a formula, you can use variables with the FileMaker command SetVar add. The syntax of this command is as follows:

SetVar ( { [ } Var1 = Expression1 {; Var2 = Expression2... ]} ; calculation statement )

Parameters

  • Var - any Variablesname, local variable name or global variable name (see guidelines for naming variables under Naming fields)
  • Expression - Any rakeexpressionField or Constant
  • Calculation instruction - Any calculation expression, field or constant
Parameters in curly brackets { } are optional.
Example: SetVar ( x=5 ; x*x ) gives 25 back.

Use variables in path specifications

Variables can be used very well in path specifications, such as those in the script command [Import data records] can be set up.

Specify variable as file path

In these dialog boxes, FileMaker supports the specification of files as variables, which enables the calculation of dynamic file names for the import of data.

More questions about FileMaker? It's quicker in person.

As part of our Coaching and training services we will be happy to inform you personally about the FileMaker functions you need for the development of your FileMaker solution. Of course, we will be happy to respond to your individual wishes. Billing is individual and fair in 15-minute increments. Pay conveniently by bank transfer or PayPal.

Related Einträge

Share this page:

ERP software as flexible as your company.
We will be happy to advise you.

Customizable ERP software for Mac, Windows and iOS.

You are here: What is a variable in FileMaker and how to use it?