

Depending on the layout, the script may run different script steps.įor example, the parameter could be set with the Get(LayoutTableName) function. The parameter may contain contextual data such as where the script is being run. One example is when the parameter is queried in an If script step. Conditional scripting using a parameterĪ parameter may be used to control how a script runs. It is now clear that the new card window will be given the customer name. New Window [ Style: Card Name: $customerName Compare that with the following: Set Variable Without knowing the contents of the script parameter, it is impossible to know how the window will be named.
#Filemaker pro calculations clean text code
This can provide a readable name for the parameter making code more self-documenting.įor example, if the script parameter being passed is the name of a customer and that data will be used to name a new card window, the following code might be used: New Window It can be accessed at any time using the Get ( ScriptParameter ) function.įor convenience, a developer may choose to extract the parameter into a variable (or multiple variables) at the start of the script. Accessing a parameterĪ parameter passed to a script is available only within that script. It also means that raw container field contents cannot be passed as parameters – they must first be converted to text (e.g. This can have important implications when the data is expected to be used as number or date.

It is important to understand that a script parameter is passed as text.

The Edit… button provides access to the FileMaker calculation engine such that the script parameter can be a calculated result determined when the script runs. In the simple case of defining a button, when the action is to Perform Script, the (optional) script parameter can be defined in the lower part of the Specify Script dialog: In most cases, when a script is called a parameter can be passed to the script. timer running in a window runs a script.user selects a custom menu item defined to run a script.FileMaker Server schedule runs a script.script runs the Perform Script or Perform Script on Server step.user selects a script in the Scripts menu.Running a scriptĪ script can be called to run in a number of ways: Using a script parameter allows the developer to construct a script that can run differently according to the conditions. The text is often used to make decisions during the script. A parameter is text that is passed to a FileMaker script when it runs.
