Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

relationship between siblings


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

Recommended Posts

Posted

Hi, I have a database of children in schools.

Sometimes siblings should receive only one document in common, so that if one sibling has received it, the other(s) should not.

The parents are not always registered, so that they may not be a common link.

How can I proceed to make an easy solution to easily register a relationship between siblings?

And in such a way that the relationships only needs to be registered once from one sibling.

Posted

I have now created a fictional parent table, and when standing in the record for one of the children, i run a script that checks whether the child already has a fictional parentID attached or not. If it does, the script goes to that parent, if it does not, it creates a new parent where the id is the same as the child´s name and id (not a very robust solution, i know)

The scripts are shown below.

This seems to do the trick, but I now have the problem of adding a new sibling.

I would like a list of children from that particular preschool to automatically come up in a popup field.

If the value list states "only related values..." I get "no values defined".

If the value list states "include all values", i get all the children from different schools.

Does anyone have a good idea about how to add a new child/sibling to the parent, based on the children in that particular school?

Or an other solution all together about how to solve this sibling problem?

Script "new parent"

Copy [ Barn::Navn på barn ] [ Select ]

If [ IsEmpty ( Barn::parentID ) ]

Perform Script [ “makeParentID” ]

Go to Field [ Barn::parentID ]

Else

Go to Related Record [ From table: “Parent”; Using layout: “Parent” (Parent) ] [ Show only related records; New window ]

End If

Script “makeParentID”

Copy [ Barn::ID og navn ] [ Select ]

Paste [ Barn::parentID ] [ Select ]

Go to Layout [ “Parent” (Parent) ]

New Record/Request

Paste [ Parent::parentID ] [ Select ]

Posted

Let's see if I've got this straight...

You're looking at a child's record and you want to add a ParentID to their Parent field. The ParentID choices should draw from all the children who attend the child's school.

Create a relationship between Children and a new table occurrence of the same table, Children, based on SchoolID. So, now when you're looking at a Child, you can see all the children that attend the same school.

Define your value list to filter on that relationship (using only "related values") and use the "second field" option. The first field is Parent ID, the second, the Child's name.

Oh, and I always use Set Variable[] and Set Field[] rather than Copy and Paste.

This topic is 5204 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.