4D v19INVOKE ACTION |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19
INVOKE ACTION
|
INVOKE ACTION ( action {; target} ) | ||||||||
Parameter | Type | Description | ||||||
action | String |
![]() |
Standard action name or pattern including parameter if required | |||||
target | Longint |
![]() |
Defines where to execute the action: current form (default) or main form | |||||
The INVOKE ACTION command triggers the standard action defined by the action parameter, optionally in the target context.
In action, pass the name of the standard action to execute. It can be a string or a constant from the Standard Action theme.
All available actions are listed in the Standard actions section of the 4D Design Reference manual.
Notes:
In target, you can pass the form context where the action must be executed. You can use one of the following constants from the Standard Action theme:
Constant | Type | Value | Comment |
ak current form | Longint | 1 | The current form is the form where the action was called. It could be either the main form or a palette form in front of the main form of the current process. |
ak main form | Longint | 2 | The main form is the frontmost document or dialog form of the process, excluding any floating or pop-up window. |
Note: If target is omitted, by default the ak current form context is used.
Depending on the target, the INVOKE ACTION command execution is either synchronous or asynchronous:
Note: Standard edit actions (Cut, Copy, Paste, Select all, Clear, Undo/Redo) ignore the target parameter, if passed. Such actions are always executed synchronously in the context of the editable object that has the focus.
The INVOKE ACTION command does not generate an error, for example, if the requested action is not available in the current context. You must validate the expected action using the Get action info command.
You want to execute the Copy standard action in the current form:
INVOKE ACTION(ak copy;ak current form)
You want to execute a Goto page standard action (page 3) in the main form:
INVOKE ACTION(ak goto page+"?value=3";ak main form)
Product: 4D
Theme: Language
Number:
1439
Created: 4D v16 R3
4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)