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 the following:
      • alphanumeric string
      • alphanumeric value-list is required with the IN operator The value-list should be in the form A, B, C and can contain bookmarks.
      • [bookmark] specifies a Microsoft Word bookmark. The square brackets are required.
      • EMPTY indicates that the field is empty.
      • NULL indicates that the field has never been set.
      • NOW () specifies that the current date and time is to be used.
      • +n.n can follow NOW () to add a number of days (with optional decimal) to the current date.
    • 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: September 19, 2017 at 13:24 pm; green text = new