PhixFlow Help
ifNull
Function: ifNull()
Returns a value depending on whether a supplied expression is _NULL
Syntax
- ifNull(expression, nullReturnValue)
- ifNull(expression, nullReturnValue, notNullReturnValue)
Argument | Type | Description |
---|---|---|
expression | Any | The expression to be evaluated and checked. If notNullReturnValue is not provided, then this is also the return value for the function if expression does not evaluate to _NULL. |
nullReturnValue | Any | The value to be returned if expression is _NULL |
notNullReturnValue | Any | An optional parameter containing the value to be returned if expression does not evaluate to _NULL. |
Examples
ifNull( in.prodID, "failed", "success" )
Resolve the status of an order for which, if it has been successful, we expect to find a product ID on a target system. If in.prodID has a value, the order was successful. If in.prodID is _NULL, the order failed.
ifNull(calls.numCalls, 0)
Get the number of calls from an lookup Pipe. If there are no calls, calls.numCalls is _NULL so we assign the value 0. Otherwise, we simply want the original value of calls.numCalls.
See Also
Please let us know if we could improve this page feedback@phixflow.com