4D v16.3

EXECUTE METHOD

Home

 
4D v16.3
EXECUTE METHOD

EXECUTE METHOD 


 

EXECUTE METHOD ( methodName {; result {; param}}{; param2 ; ... ; paramN} ) 
Parameter Type   Description
methodName  String in Name of project method to be executed
result  Variable, Operator in Variable receiving the method result or * for a method not returning a result
param  Expression in Parameter(s) of the method

The EXECUTE METHOD command executes the methodName project method while passing any parameters in param1...paramN. You can pass the name of any method that can be called from the database or the component executing the command.

In result, you can pass a variable which will receive the result of the execution of methodName (value placed in $0 inside methodName). If the method does not return a result, pass * as the second parameter. If the method does not return a result and does not require any parameters to be passed, pass only the methodName parameter.

The execution context is preserved in the called method, which means that the current form and any current form event remain defined.

If you call this command from a component and pass a method name belonging to the host database in methodName (or vice versa), the method must have been shared (“Shared by components and host database” option, in the Method properties).

If this command is executed correctly, the system variable OK is set to 1; otherwise, it is set to 0.



See also 

EXECUTE FORMULA

 
PROPERTIES 

Product: 4D
Theme: Language
Number: 1007

The OK variable is changed by the commandThis command can be run in preemptive processes

 
HISTORY 

Created: 4D v11 SQL

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)