Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Using Tap Forms › Link a child form to 2 different parent forms
- This topic has 6 replies, 3 voices, and was last updated 9 years, 5 months ago by Ron.
-
AuthorPosts
-
November 14, 2014 at 1:43 PM #11745
RonParticipantMac 10.9.5
Tap Forms 3.0Is it possible to link a child form to 2 different parent forms? In testing it does not seem possible. If I display the linked parents in child record if I change the value of one of the parent records the other parent data disappears.
Ron
November 15, 2014 at 4:32 PM #11758
BrendanKeymasterHi Ron,
Each record in the database has one field to store the record’s parent field id and the record’s parent record id. So it’s not possible to have multiple parents in a one-to-many relationship, but it is with a many-to-many relationship.
Thanks,
Brendan
November 15, 2014 at 4:42 PM #11763
RonParticipantChild Database
Parent 1 Database
Parent 2 DatabaseThe child has a one to many relation to each of the parent databases. I would like to display info from both parent databases in the child database.
Ron
November 15, 2014 at 6:36 PM #11765
BrendanKeymasterHi Ron,
Hmm… I sounds like you have it backwards.
The child database is your parent database and your 2 parent databases sound like child databases. You should be able to do that if you have 2 one-to-many Link to Form fields that point to two different child forms.
Thanks,
Brendan
November 16, 2014 at 11:23 AM #11780
RonParticipantLet’s try an example.
I travel often and I want to keep track of the trips I take and also the places I stay overnight. When traveling I often stay at the same motels overnight. Each trip will have many stops and each motel will have many stops.
Trip = One
Motel = One
Stops = ManyEach Stop can reference only one Trip and each Stop can reference only one Motel, but each Trip can reference many Stops and each Motel can reference many Stops.
So in the Trip database I can have a listing of all the Stops for that trip and in the Motel database I can have a listing of all the Stops for that Motel.
Ron
November 16, 2014 at 11:48 AM #11781
LeoParticipantHi Ron,
this is only one parent: The trip Form
Use as
Trip parent, every trip is added in here, filter or sort as you like
Motel= Many, so you can choose the same mother on different trips, (be sure to set show reverse link)
Stops= Many, also show reverse link
This will do exactly what you want.
Every trip wil show the stops and motel (all you wanted)
Leo
November 16, 2014 at 1:45 PM #11782
RonParticipantNot exactly, but it will work.
Thanks
Ron -
AuthorPosts
You must be logged in to reply to this topic.