ATC: EXIT condition  | ( WHEN table.field  (operator value-expression | IsChanging))

This command ends the workflow script if conditions are met. This is a useful way to have the remainder of the script be ignored if the document is “sent back” or “rejected”.

  • condition is required if the WHEN option (described below) is not used and not allowed if the WHEN option is used. There are several possible conditions but you can use only one at a time.
  • WHEN table.field (operator value-expression | IsChanging) ends the script if the specified condition is TRUE.
  • table is optional; however, if it is omitted, the Document Header (DocMasterDetail) is assumed. It specifies the target of the assignment. You can use @ to reference the current row in a FOREACH loop.
  • . (period) is required only if table is specified. It separates table from field.
  • field is required. It specifies the field to be evaluated.
  • operator is optional but required with value-expression. Valid operators are
    • =
    • !=
    • >
    • <
    • IN
    • LIKE
    • NOTLIKE
  • value-expression is optional but required with operator. The value can be any of  those listed in KBA-01932.
  • IsChanging is optional and used instead of operator value-expression. It evaluates whether the field is changing.

Examples

ATC: EXIT STAGE 3

The above example means “if the document has been routed back to a previous routee multiple times and is, therefore, currently in stage 3 (or greater) of the route, end the script.”

ATC: EXIT NOSEQ *

The above example means “if there is no routee in the next Seq, end the workflow script.”

ATC: EXIT PASTSEQ 3

The above example means “end the script once the routee at Seq 2 has sent the document on.”

ATC: EXIT WHEN Status = C

The above example means “if the document has a Status equal to Closed (C), end the script.”

ATC: EXIT WHEN Subtype = NULL
ATC: EXIT WHEN Subtype = EMPTY

The above example means “if the document has a blank or null subtype, end the script”.  Yes, empty and null are different things.

 


Last updated: June 3, 2026 at 12:58 pm; green text = new

Related Post

ATC: CLOSEATC: CLOSE

ATC: CLOSE This command sets the closed date on the current document to today. This effectively closes the document, regardless of status. Example ATC: CLOSE The above example means “close

ATC: ATTACH ASSEMBLEATC: ATTACH ASSEMBLE

ATC: ATTACH ASSEMBLE options  This command assembles all attachments that are flagged as Incl=Assemble (on the document’s Attachment tab) and attaches that assembled PDF file to the target document. options are optional.  There are several

ATC: ADD COMMENTATC: ADD COMMENT

ATC: ADD COMMENT description This command adds a comment/remark to the current target document. description is required. The freeform description can be any text and can include spaces Note: to format