version 11 (Modified)
EXECUTE FORMULA (statement)
Parameter | Type | Description | |
statement | String | Code to be executed |
Description
EXECUTE FORMULA executes statement as a line of code. The statement string must be one line. If statement is an empty string, EXECUTE FORMULA does nothing.
The rule of thumb is that if the statement can be executed as a one line method, then it will execute properly. Use EXECUTE FORMULA sparingly, as it slows down execution speed. In a compiled database, the line of code is not compiled. This means that statement will be executed, but it will not have been checked by the compiler at compilation time.
The statement can be in the following:
a Call to a project method
a Call to a 4D command
an Assignment
The formula can include process variables and interprocess variables. However, the statement cannot contain control of flow statements (If, While, etc.), because it must be in one line of code.
Example
See examples for the Command Name command.
See Also