The continue statement skips a particular iteration within a loop based on specified condition and continues with the iteration process. Typically used instead of using conditional statements to skip/ignore certain portion of a loop.
The syntax can be placed within the loop after a conditional statement. When the condition is met, the current iteration is skipped while the loop continues.
In the following example, "li" is a list containing colours "Blue", "Green" and "Red". While iterating through the list, when "Green" is found, the iteration is skipped for "Green" and the other list values are returned.
for each rec in li
if(rec == "Green")
Let us say we have a list of "Delivered" orders and "Pending" orders. To send a mail to "Pending" Orders and skip "Delivered" orders, we can use the "continue" statement as shown below:
if(Status == "Delivered")
from: <enter an email ID or valid zoho variable>
to: <enter an email ID or valid zoho variable>
subject: <Enter a Subject>
message: <Enter your Message>
In this case, a mail can be sent to owners of "Pending" orders and the loop can be continued by removing "Pending" orders from the list for further use.