Calculation field evaluates even though all referenced fields are empty
FMPRO ADV 13.0v3
Operating system version
Description of the issue
A calculation set to compute the difference of two dates evaluates even when the date fields referenced in the expression are empty.
Steps to reproduce the problem
Define this expression in a field of type calculation:
If ( IsEmpty ( DateRemoved ) ; Get ( CurrentDate ) ; DateRemoved ) - DateInUse
Leave the "Do not evaluate if all referenced fields are empty" check box selected.
Create a new record (which then has both date fields empty as they do not auto-enter values) and check the value of this calculation field.
An Empty Field
The field shows the number of days since 12/31/0000--the numeric value of Get ( CurrentDate ) - 0.
Selecting stored or unstored storage options does not change the results shown.
Modify the calculation to test for both fields empty:
Case ( IsEmpty ( DateRemoved ) and IsEmpty ( DateInUse ) ; "" ;
IsEmpty ( DateRemoved ) ; Get ( CurrentDate ) - DateInUse;
DateRemoved - DateInUse