Jump to content

one parent record for portal


GlennC

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

Recommended Posts

I have a self-joined file with a portal on one of the layouts.

I want to see only one record of the 'parent' with all related records in the portal. For example, if the the portal is for addresses in a particular state, I want only one screen for that state and all the matching records to be in the portal. At the moment, if I had say 100 records for a state, I have 100 records all with the same portal in them.

Sorry if this question is a little dumb.

FileMaker Version: 6

Platform: Windows XP

Link to comment
Share on other sites

Glenn->

I'm not sure I'm interpreting your question properly, but here goes: I think you want the portal to show all records that match a value in the currently displayed record. If that's the case, the relationship used by the portal can simply match the field with that value to itself.

In your state example, the self-join relationship would match the state field to the state field. So any address in a given state that is displayed on the layout will list all addresses for that state in the portal.

Is this what you wanted?

Link to comment
Share on other sites

Thanks Sam, sorry my question was clumsily worded - a confused state of mind too late at night.

Let's say I have 600 records, within each record is an address including the geographical State. Let's say all the addresses are in one of only 6 States. Say 100 records for each. What I am hoping to achieve is a layout somehow sorted by State, so that I only have six records in the set - one for each State, each with the matching 100 records in the portal.

Is this possible to achieve? Do I need a portal within a portal? Perhaps I might need a new file - something I was trying to avoid. Unfortunately my brain is doing circles here.

Link to comment
Share on other sites

Hi,

Here's on method even though this would need some settings and scripting.

1) Create a SelfRelationship with the State field at both sides

2) Create a calculation cReturnOne = Case(ID=SelfJoin:ID,ID,"")

Drop this field in one empty layout (only this field)

3) Create a layout with the State field on it and a portal based on the SelfJoin, which I think would hold the contacts fields. Let's call it "State Report Layout".

4) Add a global gStatesID (text)

5) Create a Relationship "UniqueStates"gStates::ID

6) A script

Show All Records

Go To Layout[Empty with cReturnOne field]

Copy All Records

Go To Layout[Any with gStatesID]

Paste[select-gStatesID]

Go To Related Records[uniqueStates-show only]

Go To Layout[state Report Layout]

Even though it seems tedious, you should get your list appearing in less than a few seconds.

Your second idea, "the portal in a portal" would work as well, but you'd have one record only, not 6 of them in a found set.

HTH

FileMaker Version: 6

Platform: Mac OS 9

Link to comment
Share on other sites

  • 3 months later...

This is my problem too.... but I am using FMPro7. I am very computer illiterate so need easy to understand instructions.

I have set up the relationship - one table with all information in it and the other with only the related info (in my case, Company Name). I have a layout with a portal which links to the staff within the company, but have to manually enter the company name in order for the staff list to be seen.

(1) How can this be done automatically when I add a new record in the main table

(2) Is it possible for no duplicates of the company name to appear as per Glenn C's request

Here's hoping someone out there likes me and will help....

Link to comment
Share on other sites

all u have to do is to create a relationship between the 2 tables, and check the option "allow creation...." in the child table that u want the data auto-entered.

then when u create a portal, simply take out the field that's related, or if u still want to see it there, leave it.

that should do the job... i work on this sort of layout all the time. let me know if it still doesnt work.

Link to comment
Share on other sites

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