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 - Show more from this author

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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: