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: DISPATCHATC: DISPATCH

ATC: DISPATCH as $Variable | Status  Code x freeform note This command routes a document forward or backward and can include the Route Response code and Note. The command also

ATC: ADDRATC: ADDR

ATC: ADDR target-addr -type source- addr -type This command sets the target address in the target document based on the specified source address type in the source document. target-addr-type is