Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5409 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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.

Posted (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 by Guest
Added update
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.