## Test

The Test function allows you to test if the action test state is true or false, to optionally run an action and then to continue, exit or stop. Exit stops execution of the current action. Stop cancels execution of all running actions and returns control to the user.

To run an action you must set the Run action option and choose an action to run from the drop down list.

If you specify to run an action, the current execution mode is maintained. This means that if the current action is being run stepwise, the new action will run stepwise. If the current action is being run grouped, the new action will run grouped. The Group option can be used to force the specified action to run grouped.

When Group is selected, you can choose to run the action only once. The effect is that only a single file is processed. This is useful when the action is processing data which is independent of the metadata in the tracks. For example you might be processing a query database or a list. This combination of options is similar to the Constrain Execution to a Single File statement.

The Test statement can specify that the named action is inline. When Inline is specified there must be a Start function inside the current action with the specified name.

The Indirect option enables the use of Escape Sequences in the text field where you specify the name of the action to be run. This enables you to choose the action to be run based on the contents of Variable fields or any other constructed pattern. The action name is only validated at run time. If the evaluated name is empty, no action will be run. You can setup lists using the various list functions to contain the names of actions; inline or not. By using the List Item At Index function, you can pull an action name and place it in a variable which can then be specified in the Test statement.

Note that a Test function is run once per set of files when run stepwise.