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

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

Recommended Posts

Posted

I ran a few basic searches and skimmed this board, but could not really find anything that helped (though I may not even know for sure what I am looking for :o

I have always heard/read 'never use repeating fields!' so I am unfamiliar with them (and it has been awhile since I have done any developing...).

Anyhow! Here is my scenario:

I have a single table which we are using to build a list of terms/definitions for a Glossary.

I want to be able to display 'related' records. I feel like there must be a very easy way to accomplish this and my head is just trying to make it way to difficult...

Currently I ran a relationship between the ID and a new repeating field I made (first repeating field ever). I then figured I could have a field to plug in a term and script adding it to repeating fields and displaying inbound relations via a portal.

Have not yet looked into how to determine which repition is the first one blank or anything like that, as this approach feels way to 'dirty'...

Hoping someone can show me the light :) How do I have a portal (or 2 - inbound/outbound) showing 'related' records from the same table?

Posted

Not sure if this is what you need but here goes. I do use repeating fields but not in relationships. For self join I usually use globals. If the related records you seek are for example a category (or letter for a glossary). I place the portal with the related records from Category to global category and at the top of the layout I place the global field. Simply type "A" in the global and your related records pop up. For anything other than a single letter I prefer to use a value list from the category field to avoid spelling errors and keep the relationship true. Hope this helps.

Mike

Posted

First off, you don't need repeating fields to accomplish your goal.

I will assume your structure includes: a table Terms with fields RecordID, ParentID, and a bunch of other fields.

To show the children of a parent, on the relationship graph, add a SECOND copy of your table and relate the RecordID to the ParentID. You can easily do this by dragging from the RecordID to ParentID. FM will ask you what to name the new copy of Terms, and you can enter "Parent".

Now, build a layout using the "Parent" copy of the Terms table, add a portal on this layout that is based on "Terms", add fields to each part (making sure to use fields from Parent on the main layout and Terms in the portal), and you should be good to go...

If you want to add children directly to the portal, make sure you check the box that allows you to create records via the relationship. Oh, yes, and it's quite likely that you'll want to set it so that if you delete the parent, the children get deleted too.

David

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