All FileMaker Variables Should Be Global… Or Not.

WIM DECORTE brings some clarity to the use of variables throughout FileMaker:

FileMaker has three types of variables for use in those different scopes:
  • global variables: they have a double dollar sign prefix ($$myvar) and once declared they will retain their value until the FileMaker file closes (or some scripted or calculated action clears their value).  You’d typically use the “Set Variable” script step to declare them.

  • local variables: they have a singe dollar sign prefix ($myvar), these variables are typically declared in a script and retain their value until the end of the script (or until a scripted or calculated action clears their value). You’d typically use the “Set Variable” script step to declare them.

  • calculation variables: there is no preset prefix or naming convention and I typically use an underscore for them (_myvar), these varaibles are declared by a Let() function call and only retain their value until the calculation is calculated.  The Let() function can also be used to declare local and global variables.

Check it out.

 

Liked Liked
Need FileMaker Development Help? Or to purchase FileMaker Software?
Contact FM Pro Gurus for help