Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

relationship between siblings

Featured Replies

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.

  • Author

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 ]

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.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.