On Apr 14, 5:12 am, Dalibor Kusic <dalibor.kusicSPAMBUS... (AT) zg (DOT) t-
com.hr> wrote:
Hmmm... I'd swear I already posted a response this, but I'm not seeing
it... so its possible I managed not to send it.
If it showed up for you great, and I'll spare myself writing the
lengthy explanation.
If not, let me know, and I'll write more.
Bottom line, filemaker doesn't match NULLs in relationships. No worry
there.
However, when you directly evaluate comparisons on null fields, or on
fields in relationships that have no related records you are not
actually comparing NULL values. Filemaker calculations automatically
convert field references to the data type it needs. Thus if you define
a calculation
If(B::data1 = A::data2;3;0)
It will convert the value in B::data1 to its type (e.g. number or
text), and then convert a:data2 to the same type. So...
if B::data1 is a number, and it is empty ("NULL") filemaker will
convert it to the value 0.
Then it will evaluate a::data2, which if there are no related records
comes back as "NULL", which will also be converted to 0.
Then it compares if ( 0=0) which of course is true.
If b::data1 is a text field, and equivalent process occurs, except
that this time it converts NULL to the empty string, and finds that ""
= "" is true.
---
Hope that helps; If you need more help let us know.
cheers,
Dave
The solution is as you determined to use isempty (or some other method
like count() ) to determine that there is in fact at least one related
record before you reference the external field.