|
An
ExampleThis examples loops through the orders array. The <MvFOREACHSTOP> tag is used to exit the loop if an expected field is null.. Example:
<MvFOREACH ITERATOR = "l.item" ARRAY = "l.orders" INDEX = "l.pos" COUNT = "{ 100 }">
<MvCOMMENT> If this field is empty display an error and exit the loop. </MvCOMMENT>
<MvIF EXPR="{ ISNULL l.item:code }">
<MvEVAL EXPR="{ 'Error in order number ' $ l.item:id $ '. code not found.' }">
<MvFOREACHSTOP>
</MvFOREACH>
|