How To Compare With Null or Empty
From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS
<keywords content="keywords">
compare, comparing, null, comparing with null
</keywords>
How to compare with Null or Empty
To compare values with NULL, the CORRECT SYNTAX for the expression is:
CHelper.IsNull("Request.ValueToCompare")
The function will return true, if the attribute is null, and false if the attribute is not null.
Being not null means the attribute has a value.
You can also use the BAIsBlank function
BAIsBlank(<Request.ValueToCompare>)
The function will return true, if the attribute is null, and false if the attribute is not null.
The same syntax works with an array to evaluate if it is empty:
CHelper.IsEmpty("Request.ArrayToCompare")
To verify that a value is NOT NULL, the CORRECT SYNTAX for the expression is:
!CHelper.IsNull("idRequest.ValueToCompare")
!BAIsBlank(<Request.ValueToCompare>)
DO NOT USE the following statements: <idRequest.ValueToCompare>==null or <idRequest.ValueToCompare>!=null
<comments />