Terminates execution of a <@COLS>, <@ROWS>, <@FOR>, or <@OBJECTS> block. <@BREAK> causes execution to continue to the HTML following the current loop's close tag; outside of a loop, it does nothing. This tag has no attributes. This tag does not affect loops initiated with For Loop or While Loop actions.
This tag is generally used with an <@IF> tag to terminate a loop when some condition is met. Be careful to handle nested loops properly: only the innermost loop's processing is affected by the break.
The following example returns records until the accumulated total of all the company.balance columns reaches or exceeds 1000:
<@ASSIGN NAME="running_total" VALUE="0">
<@ROWS>
Here are the values from record <@CURROW> of the results:<P>
<STRONG>Company Name:</STRONG> <@COLUMN NAME="company.name"><BR>
<STRONG>Balance</STRONG> $<@COLUMN NAME="company.balance"><BR>
Running total: $<@NEXTVAL NAME="running_total" STEP='<@COLUMN NAME="company.balance">'>
<@IF EXPR="@@running_total>=1000" TRUE="<@BREAK>">
</@ROWS>
Running total of balance has reached $1000. End of records.
<@COLS> </@COLS>
<@CONTINUE>
<@EXIT>
<@FOR> </@FOR>
<@OBJECTS></@OBJECTS>
<@ROWS> </@ROWS>