This page (revision-6) was last changed on 26-Nov-2021 10:22 by rforbes

This page was created on 26-Nov-2021 10:22 by JMyers

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
6 26-Nov-2021 10:22 1 KB rforbes to previous
5 26-Nov-2021 10:22 1 KB rforbes to previous | to last
4 26-Nov-2021 10:22 1 KB rforbes to previous | to last
3 26-Nov-2021 10:22 1 KB JEscott to previous | to last COMPARISON_OF_NULL_VALUES ==> COMPARISON OF NULL VALUES
2 26-Nov-2021 10:22 1 KB JMyers to previous | to last
1 26-Nov-2021 10:22 1 KB JMyers to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 3 changed one line
Any column that does not have a value is known as being "NULL or UNKNOWN" and whenever you compare anything to a Null value the result will always be else and a NULL is not equal to another NULL.
Any column that does not have a value is known as being "NULL or UNKNOWN" and whenever you compare anything to a [Null value|NULL] the result will always be false (down the ELSE path). Also important to note is that NULL is not equal to another NULL, nor is it "not equal" - it is unknown.
At line 7 changed one line
In the workflow WF_CAND_INFO there is a need to see if the stage has changed but if this is an insert or if the stage on the old record was not filled out a direct comparison of old value to new value would fail and thus process the Else. To work around this we create a variable called old_rst_id and use the operator EQNL to assign the old value (OV) of the Stage (ID) to the variable IF it is not null BUT if it is null than the value of 0 (zero) will be assigned to the old_rst_id variable.
In this workflow usercalc, we want to see when a value has changed in a given field. The easy and obvious solution is to test new value against old value like this:
At line 9 changed one line
The same could be done for the new value but if it is null the rest of the logic doesn't matter so we will want to go to the Else point anyway.
|5000 |IF |NV |EID.DRIVERS_LICENSE |EQ |OV |EID.DRIVERS_LICENSE | | | 5100 |5500
At line 11 changed one line
When using this technique you must always use a value that would never actually be in the field you are comparing to in order to correctly check that there was a change occurring.
If either the new value (NV) or old value (OV) are NULL, the condition will be false and you will always go down the else branch - ''even when they are both NULL''.
At line 13 added one line
To deal with this scenario, we have to use some variables (recommended to be character type) and additional logic using the [EQNL|EQNL_OPERATOR] operator.
At line 15 added 8 lines
|5000 |LET |V |NV_DL |EQNL |NV |EID.DRIVERS_LICENSE |A | No Value |5010 |
|5010 |LET |V |OV_DL |EQNL |OV |EID.DRIVERS_LICENSE |A | No Value |5020 |
|5020 |IF |V |NV_DL |EQ |V |OV_DL | | |5100 | 5500
When using this technique you must always use a value (in this case the alpha "No Value" that would never actually be in the field you are comparing to in order to correctly check that there was a change occurring.