ATC: ENDIF

This command marks the end of an IF block that starts with ATC: IF.

Examples

ATC: IF SourceDocNo = NULL
     ATC: SET SourceDocNo = DocNo
ATC: ENDIF

The above example means “if the current document has no Source Doc Number, set the Source Doc Number equal to the Doc Number.”

ATC: IF NOT Status IsChanging
	ATC: IF NOSEQ *
		ATC: SET STATUS = C
	ATC: ENDIF 
ATC: ENDIF 

The above example means “if the current document status is not already changing, then if no further route sequence is found, then set the status of the document to C.”  This workflow makes it very easy to close documents that have no more route


Last updated: October 16, 2019 at 16:52 pm;  

Related Post

ATC: GETATC: GET

ATC: GET KEY dataPK  | [doctype] project document supplemental; WITH option This command loads a document. After this command, the loaded document is selected as the current document so that

ATC: ERRORIFATC: ERRORIF

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.

ATC: SAVEATC: SAVE

ATC: SAVE WITH options This command saves the current document. Errors during the save are catch-able (see ATC: CATCH). You can specify WITH followed by these options (space separated): Release – Releases