Skip to main content

StopStep

procedure StopStep;

Example

procedure ScriptEvent(var Value: variant);
begin
if Value = 'SKIP' then
begin
StopStep;
Exit; // StopStep itself does not leave this script
end;

Value := Trim(Value);
end;

Usage

StopStep aliases CancelExecution, cancelling every view and field in the current map without cancelling the enclosing flow.

Exact behaviour

Current map contextEffect
Field mapCancels every view and every field in the field's containing map.
View mapCancels every view and every field in the view's containing map.
Other or absentNo operation and no diagnostic.

The active mapping loop observes the changed flags after the script returns. The call does not immediately leave the current script, so use Exit when subsequent statements must not run.

Additional Technical Info

StopStep is a compatibility name for CancelExecution. Its implementation consists solely of calling CancelExecution; it has no separate concept of an action step and does not set the enclosing flow log's cancellation flag.

The name is misleading in both directions: the operation does not identify one configured action step, but it does cancel more than the current field or view. From either supported context it obtains the containing TvxMap and cancels every view and field in that map. Outside those contexts it silently does nothing. The example is fictional and source-reviewed only.

Important limitations

  • It does not identify one configured action step; it applies map-wide cancellation flags.
  • It does not set Log.IsCancelled and therefore does not request that later action items stop.
  • It does not set failure status, add a log message or raise an exception.
  • It does not undo database, file, transport or other side effects.
  • It has no result with which to detect an unsupported context.

For a flow-level cancellation signal, use StopExecution, StopAction or StopFlow. Even those procedures do not unwind the script, so explicit script control flow remains necessary.

Implementation

procedure TvxScripter.StopStep;
begin
CancelExecution;
end;

This direct wrapper is why all behavioural changes and quirks of CancelExecution also apply to StopStep.

Related entries

Created 2026-07-15