Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



Excerpt
hiddentrue

do(expression1, expression2,..., expressionN) Evaluates a number of Expressions in sequence and returns the value returned by the last Expression in the list.


Function: do()

Evaluates a number of Expressions in sequence and returns the value returned by the last Expression in the list.

...

ArgumentTypeDescription
expressionNExpressionAny valid Expression

If Note that if a break() or continue() function is used within the do() then the do() function returns immediately and since it has not reached the last expression in the list a _NULL value will be returned.

Examples


Code Block
do( 
   $difference = crm.total - billing.total, 
   
   if( $difference != 0, 
      addElement( $errors, "difference in totals") 
   ),
 
   $difference
)

The first expression in the list calculates the difference between a total from the CRM system and a corresponding total from the Billing system and then assigns this difference to the $-Variable $difference.

...