LassoScript Utility
Basics Browse Detail


Tag Link [Loop_Abort] Category Conditional
Type Process Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type None Security None
Implementation Internal Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0
Lasso 3 Equivalent [LoopAbort]


[Loop_Abort] aborts the [Loop] ... [/Loop] or [While] ... [/While] tags, jumping immediately to the closing tag and not executing any further repetitions of the loop.

The [Loop_Abort] tag can be used to abort any looping container tag included [Records] ... [/Records], [Search_Arguments] ... [/Search_Arguments], [Sort_Arguments] ... [/Sort_Arguments], and more.


[Loop: Loop Count]

[While: Conditional Expression]


No Parameters Required.


To abort a [While] ... [/While] loop when a value is found:

Use the [Loop_Abort] tag. The following example shows a [Loop] loop which performs a calculation until a negative value is found and [Loop_Abort] is called.

The variable result returns 51 at the end since (50-51) is less than 0.

[Loop: 100]
  [Var: 'Result'=(50 - (Loop_Count))]
  [If: (Var: 'Result') < 0]
<p>[Var: 'Result']


Related Tags

Category Tags