api:break
Version 25.3.9411
Version 25.3.9411
api:break
Use the api:break keyword to break out of iterations of api:call or api:enum. You can also use it to break out of an entire script if it is used outside the scope of any other APIScript keywords.
Parameters
None
Control Attributes
None
Example
Break out of api:enum. The example below lists the first two attributes of the item foo:
<api:set attr="foo.attr1" value="value1"/>
<api:set attr="foo.attr2" value="value2"/>
<api:set attr="foo.attr3" value="value3"/>
<api:enum item="foo">
[_index]: [_attr] has the value [_value].
<api:equals attr="_index" value="2">
<api:break/>
</api:equals>
</api:enum>
See Also
- api:continue: Continue to the next item.
- api:enum: Loop over the values of an item, list, range, or multi-valued attribute.
- api:call: Loop over items returned by an operation.