Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multi criteria relationships

Status
Not open for further replies.

nkilbourn

Programmer
Nov 3, 2006
3
US
I need to create a portal that can show multiple records base on relationships between 2 files. Currently I can base a relationship on 2 or more fields using the "and" operative, but I need it to be an "or" because I want to find any occurance of a related table if the "key" is in any of 2 fields of the related table.

Any suggestions?
 
Not much info to work with, but here we go.

The solution is to use a separate relationship for each match criteria, then have a calc in the parent table check if only one of the relationships has related records. If so, it builds the key. This is then matched with the multi-line on the child side.

parent_xor_key (calculation, text result) = case(not isempty(rel by criteria1::recordID) xor not isempty(rel by criteria2::recordID); g_criteria1 & ¶ & g_criteria2 )

Just as a matter of interest - can you explain why you are trying to do this in this case? I don't see what the OR relationship will do for you.

What I can see is that it will show all data related to an item, and all the other items separately (but not items on not related items). Is that what you want?

If so, I would use two portals - one which showed all related items, another which showed all remaining items.

I'm not saying OR relationships are not needed, just asking what you are trying to do here.

 
Thanks for your input - I want to see in a portal of a table of records that could have a match in field 1,2 or 3.

Explanation, my agents can have a seminar that they are either the lead agent, backup agent or presenter and I want to show the seminar info in a portal.
 
Then I would go for the 3 portals.

Lead Agent, backup agent and presenter.

This way it will be easy to have, at every given moment, an overview.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top