Function overview
Prototype
_getVariable (
varName; index )
Parameters
varName The global variable name
index The index to access
Description
Tags:
Variables
This function is the corresponding one to _setVariable(), which allows the usage of dynamic global variables - one's you don't know the name of when you wrote the code.
These variables can be leveraged to create "objects" that are stored within various global variables, for example, see:
http://fmforums.com/forum/showtopic.php?tid/187684
Examples
Sample input
_getVariable( "$$a"; 1 )
Sample output
The contents of variable $$a[1].
Function code
If (Left(varName;2) = "$$";
Evaluate( varName & "[" & index & "]" ); "<bug>" )
// ===================================
/*
This function is published on FileMaker Custom Functions
to check for updates and provide feedback and bug reports
please visit http://www.fmfunctions.com/fid/159
Prototype: _getVariable( varName; index )
Function Author: The Shadow (http://www.fmfunctions.com/mid/34)
Last updated: 23 December 2008
Version: 1.1
*/
// ===================================
If (Left(varName;2) = "$$";__LITBR__ Evaluate( varName & "[" & index & "]" ); "<bug>" )__LITBR____LITBR__// ===================================__LITBR__/*__LITBR____LITBR__ This function is published on FileMaker Custom Functions__LITBR__ to check for updates and provide feedback and bug reports__LITBR__ please visit http://www.fmfunctions.com/fid/159__LITBR____LITBR__ Prototype: _getVariable( varName; index )__LITBR__ Function Author: The Shadow (http://www.fmfunctions.com/mid/34)__LITBR__ Last updated: 23 December 2008__LITBR__ Version: 1.1__LITBR____LITBR__*/__LITBR__// ===================================
Login or register to comment
Create a new account with fmcustomfunctions.com or login to post a comment.