Brian Dunning's FileMaker Custom Functions

VariableGlobalize ( LocalVariableName )

Changes the scope of a Local variable to a Global variable of the same name, with the same contents.

  Average rating: 4.2 (30 votes) Log in to vote

Jonathan Mickelson   Jonathan Mickelson

Share on Facebook Share on Twitter

  Sample input:
If $testVar = 56:
VariableGlobalize ( "$testVar" )
  Sample output:
$$testVar = 56 and
$testVar = null

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Requires FileMaker 8 or higher.

This function Transfers the contents of a Local variable to a Global variable of the same name and clears the original variable.

This is valuable for instances where a local variable has been used throughout a script and it's then determined that the scope of the variable should persist beyond the current script.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.