.izeanorg. Posted January 30, 2010 Posted January 30, 2010 I've seen a few example of this using table view, but... My program is for a tutoring service and here is how I'd like to implement this: I have a table for Children, a table for Parents, a join table to join parents with children. I also have a Contacts table for all contacts (parent and children). On the Children layout, you have the option to relate a parent to the child and this shown using a portal. Currently, I have it set up to change layouts, search parents, then add the parent, via the found set, and child to the join, then back to the Children table. This works fine. I'd like to add a portal to the Children layout so i could search the parents, display them in the Children table and add them to the join without ever leaving the Children layout. Is that possible?
efen Posted January 30, 2010 Posted January 30, 2010 Create a cartesian join [ x ] from the unique serialID of the children's table to the unique serialID of the parent's table so that all the parents can be shown in a portal using this relationship on the children's layout. Script it so that on this children's layout you capture, in variables, the ID of the child and the ID of the parent in the portal. Then goto the join layout, create a new record and transfer the IDs to their corresponding fields in that join table. Return to the children's layout. You do leave the children's layout but the user will be unaware of this. ... and welcome to the forums.
LaRetta Posted January 31, 2010 Posted January 31, 2010 (edited) Create a cartesian join [ x ] from the unique serialID of the children's table to the unique serialID of the parent's table so that all the parents can be shown in a portal using this relationship on the children's layout. I just wanted to clarify (and I'm sure you know this but others might not), that you don't need to connect ID to ID when using a Cartesian Product. I know it says you need to join ID to ID in FileMaker's Knowledge Base Answer 5463 but that is incorrect. You can join ANY two fields except for unstored calculations, globals or containers. And the field types don't have to match and fields used in the match don't even need values (they can be null). In fact, one of the tables can have NO records at all but (if you place a portal from the other table on its layout), will display all records from the other table. UPDATE: Upon considering further, once created, you could even delete the fields used for the join. And globals WILL work on either side. It would be nice to have a complete list documented in Help and in Knowledge Base. Edited January 31, 2010 by Guest Added update
LaRetta Posted January 31, 2010 Posted January 31, 2010 I have a table for Children, a table for Parents, a join table to join parents with children. I also have a Contacts table for all contacts (parent and children). I believe you might have unnecessary tables here which over-complicates your solution. If you would consider it, you might post an example. We might be able to make it easier for you.
Recommended Posts
This topic is 5409 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now