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: EXITATC: EXIT

ATC: EXIT condition  | ( WHEN table.field  (operator value-expression | IsChanging)) This command ends the workflow script if conditions are met. This is a useful way to have the remainder of

ATC: ASSIGNATC: ASSIGN

ATC: ASSIGN role TO who ON project This command assigns a specified role to a specific user, optionally for specific projects. role is required. The role must exist in the

ATC: SENDATC: SEND

ATC: SEND FROM email  TO email  SUBJ text; BODY variable options This command sends an email to the person or persons specified. “Route Via” is not relevant and contacts without