EvaluateRecursively ( expression )
Evaluates expression recursively as a calculation.
Be the first to rate this function Log in to vote
Marcus Nilsson - Show more from this author
Square Moon https://www.squaremoon.se/ |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
/**
* ==================================================================
* EvaluateRecursively ( expression )
*
* PARAMETERS:
* expression - any text expression or text field
* RETURNS:
* text, number, date, time, timestamp, container
* EXAMPLE:
* EvaluateRecursively ( "Hello world!" ) = "Hello world!"
* EvaluateRecursively ( TableName::FieldName ) = GetField ( "TableName::FieldName" )
* EvaluateRecursively ( Quote ( TableName::FieldName ) ) = GetField ( "TableName::FieldName" )
* EvaluateRecursively ( "Let ( $var = " & Quote ( "Hello world!" ) & " ; $var )" ) & " " & $var = "Hello world! Hello world!"
* DEPENDENCIES:
* None
* AUTHOR:
* Marcus Nilsson, Square Moon, marcus@squaremoon.se
* PURPOSE:
* Evaluates expression recursively as a calculation.
* NOTES:
* None
* REVISIONS:
* 2021-10-27, Marcus Nilsson. Created.
* ==================================================================
*
*/
Let (
[
~expression = expression
] ;
If ( IsValidExpression ( ~expression ) ;
If ( Position ( ~expression ; "::" ; 1 ; 1 ) = 0 ;
Evaluate ( ~expression ) ;
EvaluateRecursively ( Evaluate ( ~expression ) )
) ;
~expression
)
)
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.