dbTalk Databases Forums  

Help Self Relationship Eliminate Self

comp.databases.filemaker comp.databases.filemaker


Discuss Help Self Relationship Eliminate Self in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
squeed2000@yahoo.com
 
Posts: n/a

Default Help Self Relationship Eliminate Self - 08-12-2005 , 07:48 AM






I have a table in FMP7 called "Campaign Calls". Each call inside of a
campaign is attached to a campaign with a campaign ID. In my layout I
am showing records from "Campaign Calls". But I also have a portal
using a self joining relationship to show other calls that are also
part of that campaign.

As the status of calls are changed, the portal begins to lose records
because they become unrelated.

This is working fine. But, there is always 1 record left in the portal
because the record is relating to itself.

I am trying to show all calls that are related to the campaign inside
of the portal but not the call itself that I happen to be on at the
time.

So to illustrate further, if it is a 1 call campaign. When I am on
that call, the portal shows 1 related call which is the same call that
I am on in the layout. I want it to show 0 related calls and ignore
the 1 that I am on.

-S


Reply With Quote
  #2  
Old   
Howard
 
Posts: n/a

Default Re: Help Self Relationship Eliminate Self - 08-12-2005 , 08:58 AM






Don't forget you can take advantage of multi-predicate joins in FM7.
Your portal relationship is currently based on CampaignID = CampaignID.
Add a second condition to that: SerialID<>SerialID, where each record
has its own unique serial number.


squeed2000 (AT) yahoo (DOT) com wrote:
Quote:
I have a table in FMP7 called "Campaign Calls". Each call inside of a
campaign is attached to a campaign with a campaign ID. In my layout I
am showing records from "Campaign Calls". But I also have a portal
using a self joining relationship to show other calls that are also
part of that campaign.

As the status of calls are changed, the portal begins to lose records
because they become unrelated.

This is working fine. But, there is always 1 record left in the portal
because the record is relating to itself.

I am trying to show all calls that are related to the campaign inside
of the portal but not the call itself that I happen to be on at the
time.

So to illustrate further, if it is a 1 call campaign. When I am on
that call, the portal shows 1 related call which is the same call that
I am on in the layout. I want it to show 0 related calls and ignore
the 1 that I am on.

-S


Reply With Quote
  #3  
Old   
squeed2000@yahoo.com
 
Posts: n/a

Default Re: Help Self Relationship Eliminate Self - 08-12-2005 , 01:21 PM



I don't think that this will work.

Lets say there are 3 records in the database.

Campaign Person
--------------- ------------
D0001 Joe Smith
D0002 Joe Smith
D0003 Adam Wright

When I am on the Joe Smith record in campaign D0001 I want to know
that he is also a contact that I need to call in campaign D0002.

So my current portal link is PERSON::PERSON

But when I am in Campaign D0001 I see 2 records in the portal, I see
the
duplicate record that I am actually in D0001 and I see D0002.

A unique ID on every record won't help me in the relationship, it will
then
turn into a 1:1 relationship and I won't get any related records.

-S


Reply With Quote
  #4  
Old   
Dan
 
Posts: n/a

Default Re: Help Self Relationship Eliminate Self - 08-12-2005 , 01:54 PM



The extra condition id not equal to id removes the current record, the
one you are veiwing, from the portal. It doesn't turn the relationship
into one-to-one


squeed2000 (AT) yahoo (DOT) com wrote:
Quote:
I don't think that this will work.

Lets say there are 3 records in the database.

Campaign Person
--------------- ------------
D0001 Joe Smith
D0002 Joe Smith
D0003 Adam Wright

When I am on the Joe Smith record in campaign D0001 I want to know
that he is also a contact that I need to call in campaign D0002.

So my current portal link is PERSON::PERSON

But when I am in Campaign D0001 I see 2 records in the portal, I see
the
duplicate record that I am actually in D0001 and I see D0002.

A unique ID on every record won't help me in the relationship, it will
then
turn into a 1:1 relationship and I won't get any related records.

-S
--
Dan
Using
FMP7.03, WinXP SP2




Reply With Quote
  #5  
Old   
42
 
Posts: n/a

Default Re: Help Self Relationship Eliminate Self - 08-12-2005 , 02:16 PM



In article <1123870894.461856.153810 (AT) f14g2000cwb (DOT) googlegroups.com>,
squeed2000 (AT) yahoo (DOT) com says...
Quote:
I don't think that this will work.

Lets say there are 3 records in the database.

Campaign Person
--------------- ------------
D0001 Joe Smith
D0002 Joe Smith
D0003 Adam Wright

When I am on the Joe Smith record in campaign D0001 I want to know
that he is also a contact that I need to call in campaign D0002.

So my current portal link is PERSON::PERSON

But when I am in Campaign D0001 I see 2 records in the portal, I see
the
duplicate record that I am actually in D0001 and I see D0002.

A unique ID on every record won't help me in the relationship, it will
then
turn into a 1:1 relationship and I won't get any related records.
I seriously hope that's not your real database. It probably should be
implemented as 3 tables: campaigns, people, and calls. It would be a lot
more powerful like that.

However, working with it as is with just 1 table and the 2 fields:
campaign and person you would take your existing

person = person
and add the following criteria to the relationship:
campaign <> campaign

(<> is 'not equals', FM actually uses the crossed out equal sign symbol)

Now the relationship will match all records where the name is the same,
but the campaign is different.

-dave




Reply With Quote
  #6  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Help Self Relationship Eliminate Self - 08-13-2005 , 01:47 AM



In article <MPG.1d66957eff27c5a8989c74 (AT) shawnews (DOT) vf.shawcable.net>, 42
<nospam (AT) nospam (DOT) com> wrote:

Quote:
(<> is 'not equals', FM actually uses the crossed out equal sign symbol)
FileMaker understands "<>" as well as the crossed-equal symbol -
they're interchangable with no problems. Coming from things like BASIC
programming on the C64, I've been using "<>" since last millennium and
only recently started using the "proper symbol" (sometimes). )





Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #7  
Old   
42
 
Posts: n/a

Default Re: Help Self Relationship Eliminate Self - 08-13-2005 , 02:07 PM



In article <130820051847443917%helpful_harry (AT) nom (DOT) de.plume.com>,
helpful_harry (AT) nom (DOT) de.plume.com says...
Quote:
In article <MPG.1d66957eff27c5a8989c74 (AT) shawnews (DOT) vf.shawcable.net>, 42
nospam (AT) nospam (DOT) com> wrote:

(<> is 'not equals', FM actually uses the crossed out equal sign symbol)

FileMaker understands "<>" as well as the crossed-equal symbol -
they're interchangable with no problems. Coming from things like BASIC
programming on the C64, I've been using "<>" since last millennium and
only recently started using the "proper symbol" (sometimes). )
While FM does generally understand "<>" when writing expressions it
can't be used to define relationships.

FM7 uses a drop down list, and its not in the list. So telling someone
to use "<>" who doesn't have broad programming experience could be
confused.


Reply With Quote
  #8  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Help Self Relationship Eliminate Self - 08-13-2005 , 03:59 PM



In article <MPG.1d67e4f1c4ec5611989c77 (AT) shawnews (DOT) vf.shawcable.net>, 42
<nospam (AT) nospam (DOT) com> wrote:

Quote:
In article <130820051847443917%helpful_harry (AT) nom (DOT) de.plume.com>,
helpful_harry (AT) nom (DOT) de.plume.com says...
In article <MPG.1d66957eff27c5a8989c74 (AT) shawnews (DOT) vf.shawcable.net>, 42
nospam (AT) nospam (DOT) com> wrote:

(<> is 'not equals', FM actually uses the crossed out equal sign symbol)

FileMaker understands "<>" as well as the crossed-equal symbol -
they're interchangable with no problems. Coming from things like BASIC
programming on the C64, I've been using "<>" since last millennium and
only recently started using the "proper symbol" (sometimes). )

While FM does generally understand "<>" when writing expressions it
can't be used to define relationships.

FM7 uses a drop down list, and its not in the list. So telling someone
to use "<>" who doesn't have broad programming experience could be
confused.
Yet something else FileMaker 7 doesn't do "right". ;o)

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #9  
Old   
42
 
Posts: n/a

Default Re: Help Self Relationship Eliminate Self - 08-13-2005 , 04:24 PM



In article <140820050859316869%helpful_harry (AT) nom (DOT) de.plume.com>,
helpful_harry (AT) nom (DOT) de.plume.com says...
Quote:
In article <MPG.1d67e4f1c4ec5611989c77 (AT) shawnews (DOT) vf.shawcable.net>, 42
nospam (AT) nospam (DOT) com> wrote:

In article <130820051847443917%helpful_harry (AT) nom (DOT) de.plume.com>,
helpful_harry (AT) nom (DOT) de.plume.com says...
In article <MPG.1d66957eff27c5a8989c74 (AT) shawnews (DOT) vf.shawcable.net>, 42
nospam (AT) nospam (DOT) com> wrote:

(<> is 'not equals', FM actually uses the crossed out equal sign symbol)

FileMaker understands "<>" as well as the crossed-equal symbol -
they're interchangable with no problems. Coming from things like BASIC
programming on the C64, I've been using "<>" since last millennium and
only recently started using the "proper symbol" (sometimes). )

While FM does generally understand "<>" when writing expressions it
can't be used to define relationships.

FM7 uses a drop down list, and its not in the list. So telling someone
to use "<>" who doesn't have broad programming experience could be
confused.

Yet something else FileMaker 7 doesn't do "right". ;o)
I actually completely agree with you one this one.

"<>" is superior to slashed-equals...primarily because there isn't a
slash-equals key on my keyboard. On the mac I think option-equals
does it; but I dont think there is an intuitive way to type a slash-
equals symbol under windows.

I personally prefer the c/java != operator.

-cheers,


Reply With Quote
  #10  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Help Self Relationship Eliminate Self - 08-15-2005 , 01:21 AM



In article <MPG.1d6804cb52f41295989c7a (AT) shawnews (DOT) vf.shawcable.net>, 42
<nospam (AT) nospam (DOT) com> wrote:

Quote:
In article <140820050859316869%helpful_harry (AT) nom (DOT) de.plume.com>,
helpful_harry (AT) nom (DOT) de.plume.com says...
In article <MPG.1d67e4f1c4ec5611989c77 (AT) shawnews (DOT) vf.shawcable.net>, 42
nospam (AT) nospam (DOT) com> wrote:

In article <130820051847443917%helpful_harry (AT) nom (DOT) de.plume.com>,
helpful_harry (AT) nom (DOT) de.plume.com says...
In article <MPG.1d66957eff27c5a8989c74 (AT) shawnews (DOT) vf.shawcable.net>, 42
nospam (AT) nospam (DOT) com> wrote:

(<> is 'not equals', FM actually uses the crossed out equal sign
symbol)

FileMaker understands "<>" as well as the crossed-equal symbol -
they're interchangable with no problems. Coming from things like BASIC
programming on the C64, I've been using "<>" since last millennium and
only recently started using the "proper symbol" (sometimes). )

While FM does generally understand "<>" when writing expressions it
can't be used to define relationships.

FM7 uses a drop down list, and its not in the list. So telling someone
to use "<>" who doesn't have broad programming experience could be
confused.

Yet something else FileMaker 7 doesn't do "right". ;o)

I actually completely agree with you one this one.

"<>" is superior to slashed-equals...primarily because there isn't a
slash-equals key on my keyboard. On the mac I think option-equals
does it; but I dont think there is an intuitive way to type a slash-
equals symbol under windows.

I personally prefer the c/java != operator.
Of course you could always go the long route: Not (A = B) )




Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


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.