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.

Recursive Relationship (not sure, if this is the right name for it)

Featured Replies

  • Newbies

Hi!

Just signed up in the forum because i could not find an answer to my problem in 1.5 days searching various forums and googling a lot.

I attached a partial screenshot of the relationships in the database. Basically I'm looking for a method to relate ConfigItems (which are actually servers) to each other. So for example:

ConfigItem 1 has a ConfigItem 2, which could have also ConfigItem 3 and ConfigItem 4.

How would you design this?

I tried to add another table ("CI_CI), which would keep record of the parent-CI and the child-CI.

Hopefully I could explain myself properly, otherwise I'll give it another try. ;)

Thanks in advance!

post-107075-0-72288300-1342683647_thumb.

ConfigItem 1 has a ConfigItem 2, which could have also ConfigItem 3 and ConfigItem 4.

So an item could have multiple children, but only one parent?

  • Author
  • Newbies

Yes, exactly! I'm sure you noticed, but to make sure: Parent/Children are of the same "type" (same table).

EDIT: Maybe I have to state also that I'd need to display the Children records in a portal. This hasn't worked so far, so my guess was that the relationships wouldn't work the way they should. Hence this post. ;)

Well, then you need only one table. The two important fields to have are:

ItemID - Number, Auto-enter serial number

ParentID - Number

Define these two self-join relationships:

Parent::ItemID = Items::ParentID




and:




Items::ItemID = Child::ParentID

where both Parent and Child are occurrences of the Items table. Place a portal to Child on a layout of Items to see the current item's children.

To assign an item to a parent, populate the ParentID field with the ItemID of the desired parent.

  • Author
  • Newbies

[b]Parent[/b]::ItemID = Items::ParentID




and:




Items::ItemID = [b]Child[/b]::ParentID

I'm not getting what you mean by the Parent and Child tables. These tables don't exist. Since you recommended just one table (in this case "ConfigItems") the relationships have to only in this table, which makes no sense to me. :hmm:

Sorry if I'm not getting the point. :)

I'm not getting what you mean by the Parent and Child tables. These tables don't exist..

... where both Parent and Child are occurrences of the Items table.

See also:

http://www.filemaker.com/12help/html/relational.11.10.html#1028163

  • Author
  • Newbies

Thank you very much, I didn't know about the table occurrences. Works like a charm now! ;)

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.