dbTalk Databases Forums  

Empty fields in Multi Predicate Joins

comp.databases.filemaker comp.databases.filemaker


Discuss Empty fields in Multi Predicate Joins in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
TomMcIn
 
Posts: n/a

Default Empty fields in Multi Predicate Joins - 01-15-2010 , 12:44 AM






TableA and TableB are related through a MultiPredicate Join of FieldA1
= FieldB1 and FieldA2 = FieldB2. When both of the 2 fields are
empty, no relationship is displayed even though the 1 fields have
matching values.
Is there any way to make records in which the 2 fields are both empty
still match as the relationship is true.

Tom

Reply With Quote
  #2  
Old   
Lynn Allen
 
Posts: n/a

Default Re: Empty fields in Multi Predicate JoinsX-TraceApproved - 01-15-2010 , 11:10 AM






On 2010-01-14 22:44:41 -0800, TomMcIn <tom_mcintosh (AT) shaw (DOT) ca> said:

Quote:
TableA and TableB are related through a MultiPredicate Join of FieldA1
= FieldB1 and FieldA2 = FieldB2. When both of the 2 fields are
empty, no relationship is displayed even though the 1 fields have
matching values.
Is there any way to make records in which the 2 fields are both empty
still match as the relationship is true.
The FileMaker Telepathy Plugin is still in development. So...how do you
want FM to tell *which* of the non-related records you actually want
related?

A relationship will always and only show what records have data that
match in the relating fields. So your job as a developer is to figure
out a way to provide two fields that have the proper data. It's not
the job of the software to figure it out for you.

What I would do in the above situation is that on the A side, I'd make
a calculation that combines Field 1 and Field 2, with a return in
between the values. That way, even if one or the other field is empty,
the calc will still hold a single value.

On the B side, also create a combining calculation. Relate these two
calculations. Multi-line keys work on both sides. If ANY line on the A
side matches ANY line on the B side then the records will be related.

You can also, in those calculations, append additional strings like
"All" or a unique keyfield (with a return to put the value on its own
line) which will serve to relate records in the case that either or
both 1 & 2 fields are empty.

If a relationship isn't showing what you want, the relating data isn't right.

--
Lynn Allen
--
www.semiotics.com
Member FBA
FM 10 Certified Developer

Reply With Quote
  #3  
Old   
TomMcIn
 
Posts: n/a

Default Re: Empty fields in Multi Predicate Joins - 01-15-2010 , 11:58 AM



Lynn

Thanks for your response and suggestion. I am not sure I expected
Telepathy but I using the word in many other situations.

To me, telepathy implies an empty field can have various unknown
values whereas I think of an empty field as having a single well
defined "value"" and not a "Cloudy" value.

I just figured that since the FieldX1 fields matched and the FieldX2
fields were both empty, the match should occur. If only one of the
FieldX2 was empty, no match was expected.

In any case, thanks for the suggestions to just define some
combination fields. I concatenated the fields as I was expecting a
one to one match. I now have what I want.

Tom

Reply With Quote
  #4  
Old   
Lynn Allen
 
Posts: n/a

Default Re: Empty fields in Multi Predicate Joins - 01-15-2010 , 12:08 PM



On 2010-01-15 09:58:57 -0800, TomMcIn <tom_mcintosh (AT) shaw (DOT) ca> said:

Quote:
I just figured that since the FieldX1 fields matched and the FieldX2
fields were both empty, the match should occur. If only one of the
FieldX2 was empty, no match was expected.
Perhaps someday FM will have "OR" joins. That would be nice.
Quote:
In any case, thanks for the suggestions to just define some
combination fields. I concatenated the fields as I was expecting a
one to one match. I now have what I want.
The good news is that often, those concatenated fields used to relate
tables perform better than actual multi-predicate relationships.
Something about the resolution of multiple fields slows it down a bit
compared to calculate, then relate.
--
Lynn Allen
--
www.semiotics.com
Member FBA
FM 10 Certified Developer

Reply With Quote
  #5  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Empty fields in Multi Predicate Joins - 01-15-2010 , 01:36 PM



TomMcIn wrote:

Quote:
To me, telepathy implies an empty field can have various unknown
values whereas I think of an empty field as having a single well
defined "value"" and not a "Cloudy" value.
I'm with you here, Tom. I have often wished that FileMaker's
relationships would consider empty fields on both sides as a match --
particularly in the case of multi-predicate relationships where other
fields match.

The problem here may be more than that of just making it so.
Relationships are based on indexed fields, and indexes are based on
field values. If a field is blank, then there is no entry for it in the
index.

Reply With Quote
  #6  
Old   
Philippe Manet
 
Posts: n/a

Default Re: Empty fields in Multi Predicate Joins - 01-17-2010 , 05:11 AM



Howard Schlossberg <howard (AT) nospam (DOT) fmprosolutions.com> wrote:

Quote:
The problem here may be more than that of just making it so.
Relationships are based on indexed fields, and indexes are based on
field values. If a field is blank, then there is no entry for it in the
index.
one solution could be to have a default value as "nothing" or "empty",

in fact, a "blank" character does the job
--
Philippe Manet
en fait, c'est manet avant @

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.