ATC: ERRORIF condition | (WHEN table.field (operator value-expression | IsChanging ))
This command ends the workflow script if conditions are met (i.e., an error is detected) and sends an Alert. This is a useful way to have the remainder of the script be ignored if there is a problem and to be alerted to the fact.
- 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
- 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.
- 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.
ATC: ERRORIF CLOSED
The above example means “if the document has been closed through a closing status, end the workflow script and send an Alert.”
ATC: ERRORIF NOSEQ 3
The above example means “if there is no routee in Seq #3, end this workflow script and send an Alert.”
ATC: ERRORIF NODOC [Permit] ZZ000 01;
The above example means “if there is no Permit document with a Doc No. of 01 in Project ZZ000, end this workflow script and send an Alert.”
ATC: ERRORIF WHEN Status IsChanging
The above example means “if the Status changes, end this workflow script and send an Alert.”
ATC: CATCH FOR 2 SHOW Check-in all attachments ATC: ERRORIF HAS DocAttachedFile WITH CheckOutStatus = 'O'
The above example means “if there is an error in the next two lines in the script, show the message Check-in all attachments. The error will occur if any attached file has a checkout status of O (out).”
Last updated: January 9, 2023 at 17:06 pm; green text = new