ATC: EXIT LOOP

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;