Skip to content

Flow documentation · legacy product

Action.Actions ​

Declaration ​

property Actions : array of TFloActionItem

Example ​

pascal
procedure OnMapEvent(var Value:Variant);
begin
  LogInfo('First Action Step in current Action is ' + Action.Actions[0].ActionName);
end;

Description ​

Returns the array of Action items that have been configured as the Action Steps. The first item in the array is position 0.

Determine the number of Action items in the array

You can return the number of Action items by using Action.ActionCount

Read or set whether an Action is active for the current execution of the Action

You can dynamically set an Action Step to active or inactive via Flow Scripts.

For example, the following code in your Map or Custom Script Action will cause the second Action Step to be bypassed without being executed:

Action.Actions[1].ItemActive := False;

The reference Actions[1] is a 0-based array of the Action Steps on your Action. Thus, Actions[1] is the second Action Step and Actions[0] is the first one.

This property is set on the instance of the Action being executed. It does not affect the saved configuration. Thus, setting Action.Actions[1].ItemActive := False will not untick the 'Active' tickbox of the Action Step.

If the Action is cached, however, you will find that the run-time settings are kept across multiple executions (until the FlowService instance running the Action is restarted). If necessary, the previous value of ItemActive will have to be reinstated via script.

Note that you can read the CacheAction property to determine if the Action is cached or not, as follows:.

If Action.CacheAction = True Then //if The action is cached.
begin
Action.Actions[1].ItemActive := True; //set the action step to 'active' first.
end;

Other properties for Action items

Action.Actions[i].ActionName - the name configured for that Action Step

Action.Actions[i].ActionType - one of the TFloActionType codes (fatMap, fatReport, fatShell, fatTransport, fatSQL, fatPlugin, fatCommit, fatDisconnect )