CallFunction

Metreos.ApplicationControl.CallFunction

Summary

CallFunction causes the function specified by FunctionName to begin executing, pausing the currently executing function until the called one completes.

Usage

CallFunction allows a developer to manually invoke a function (as opposed to functions being invoked automatically by the occurrence of events, which are known as event handler functions). One can invoke any function defined in the same script as that of the CallFunction.

One can pass in parameters to the function by using the custom action parameters of CallFunction, which can be initialized by local variables in the called function. The name of a custom action parameter passed in must match the InitializeWith property of the local variable. Also, one can use global variables in a function invoked by CallFunction.

If a function is invoked via CallFunction, then the custom action parameters of the EndFunction in the called function are passed back to the to custom result data for the CallFunction action in the calling function. This relationship of EndFunction action parameters and CallFunction result data is based purely on the names of the parameters; one must ensure that the name of each EndFunction action parameters and CallFunction result data are the same string value.

Remarks

If a function invoked by CallFunction ends the script instance (for instance, with EndScript or Forward), then the calling function does not have execution returned to it.

Action Parameters
Parameter Name.NET TypeDefaultDescription
FunctionName *System.StringThe name of the function to invoke. The function must exist in the same script. Functions which are event handlers can also be invoked.

No Result Data

Branch Conditions 

success

No description.

failure

No description.