ATC: EXIT LOOP

This command exits the current ATC: FOREACH loop. It is usually used within an ATC: IF block.

Example

ATC: FOREACH DocAttachedFile BY CheckOutStatus WITH CheckOutStatus <> 'H'
     ATC: IF @.CheckOutStatus = 'O'
          ATC: SET @.Note = Currently being revised
     ATC: ELSE
          ATC: IF @.CheckOutStatus > 'O'
               ATC: EXIT LOOP
          ATC: ENDIF  
     ATC: ENDIF
ATC: ENDLOOP

The above example means “check every attachment that does not have a Check Out Status of H (i.e, that is not a Document). If the Check Out Status is Checked Out (O), set the note to Currently being revised. Otherwise, if the Check Out Status is greater than O (i.e., U for ‘out to current user’ or X for ‘undo checkout’), exit the loop and stop processing attachments. Otherwise, continue checking.”


Last updated: September 19, 2017 at 11:25 am;  

Related Post

ATC: QUERYATC: QUERY

ATC: QUERY qalias d1 d2 d3 This command runs the query dynamically defined through a QueryConfig | qalias:Alias rule. The result set is thus available for other ATC commands in the workflow

ATC: COPYATC: COPY

ATC: COPY KEY dataPK  | [doctype] project document supplemental; WITH option This command creates a new document, usually by copying a source document.  The DocCopyConfig rules are applied.  After this