Home » Developer & Programmer » Forms » Showing only one record in Detail form (many to many relationship)
Showing only one record in Detail form (many to many relationship) [message #659645] Wed, 25 January 2017 11:38 Go to next message
IneedYourHelp
Messages: 27
Registered: January 2017
Junior Member
Hi

I have three tables: table A, and B as main tables and AB as my cross-reference table. A is the master form of AB and AB is the Master Form of B. When i click on a record in A it shows all the records in AB which reference to the record in A, but in table B it only shows the depending record to the first record in AB and not to all of them.
How can I show all the dependent records in B?

Thanks!
Re: Showing only one record in Detail form (many to many relationship) [message #659646 is a reply to message #659645] Wed, 25 January 2017 12:07 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member

Please read and follow the forum guidelines, to enable us to help you:
OraFAQ Forum Guide
How to use {code} tags and make your code easier to read
Re: Showing only one record in Detail form (many to many relationship) [message #659651 is a reply to message #659646] Wed, 25 January 2017 15:30 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You'll probably have to modify relationships Forms' Wizard created for you.
Re: Showing only one record in Detail form (many to many relationship) [message #659654 is a reply to message #659651] Thu, 26 January 2017 03:22 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
If you have a relationship then forms will only ever show the records in the child block that correspond to the currently selected record in the master block.
Re: Showing only one record in Detail form (many to many relationship) [message #659655 is a reply to message #659654] Thu, 26 January 2017 06:41 Go to previous messageGo to next message
IneedYourHelp
Messages: 27
Registered: January 2017
Junior Member
Thanks for your help!


@cookiemonster My problem is that I have two relationships. I select one record in the first master table A and it shows many records in the child table B. This child table B is a master table to another table C, which does not show all correspondend records to all the records in B which are displayed because of selecting a record in A.

@Littlefoot Do you have any idea what exactly I have to modify?

Thanks in advance.

[Updated on: Thu, 26 January 2017 06:42]

Report message to a moderator

Re: Showing only one record in Detail form (many to many relationship) [message #659656 is a reply to message #659655] Thu, 26 January 2017 06:48 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
If you change the selected record in B does it then show different records in C?

If so, that's how it's supposed to work.
Re: Showing only one record in Detail form (many to many relationship) [message #659657 is a reply to message #659656] Thu, 26 January 2017 07:18 Go to previous messageGo to next message
IneedYourHelp
Messages: 27
Registered: January 2017
Junior Member
If I change the selected record in B it shows different records in C.

Is this really how it supposed to work? I can't believe it..., but propably I have to accept it Very Happy

Thanks!
Re: Showing only one record in Detail form (many to many relationship) [message #659658 is a reply to message #659657] Thu, 26 January 2017 07:32 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
If it just showed all the records in C then how would you know which record in B was parent to which record in C?
When you add a new record in C how do you know which parent it's getting linked to?

You will have to live it working that way.
Re: Showing only one record in Detail form (many to many relationship) [message #659684 is a reply to message #659658] Fri, 27 January 2017 06:07 Go to previous messageGo to next message
IneedYourHelp
Messages: 27
Registered: January 2017
Junior Member
When I click on one record in A and it shows records in C they all relate to the record in A, thats the only thing I would need to know.
Re: Showing only one record in Detail form (many to many relationship) [message #659686 is a reply to message #659684] Fri, 27 January 2017 06:17 Go to previous message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Do you want to skip having the block on B?

If not then you have to live with it, your requirement is non-standard and forms doesn't work that way.

Otherwise there are options:
1) Create a view that joins B and C and base the block on that so you can link it to A.
2) Base the block on a procedure that gets all the C records that correspond to the A record.
3) Do the join manually.
Previous Topic: How to dynamically center a canvas
Next Topic: How to import excel file to oracle table in forms 10g
Goto Forum:
  


Current Time: Fri Mar 29 04:24:20 CDT 2024