Jump to content

Accessing records from portal


Joe_Schmo

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

Recommended Posts

I have a layout that contains a portal to another table. When I view the records in the main table in browse mode/table view I see all the fields OUTSIDE of the portal from the main layout, but the fields from INSIDE the portal only show the first record. For every one record of the main layout I get one record from the portal, even though there are many records in the portal for each record of the main layout.

It was suggested to try a new layout of the main table to show the fields I need from the portal, so that they are main fields in their own layout instead of a portal. I tried but this still only gives me the first record in the portal. How can I view all the records in the portal for a given record of the main layout? I can see them all in browse mode for the layout while they are in the portal but I can't add them ALL to a new layout, can't view just the portal in table view, and don't know how to access them for formulas and finds.

When I tried to make a new layout for just the portal using the new layout wizard, it asks which table I want to use fields from. My portal is in the "Safety Clearances" table and the portal itself is not a choice, so I chose the Safety Clearances one. Then I get a list of fields to add to the label, but none of the fields from the portal are there, just the fields from the main table.

So I created a second layout using the various fields from different tables that the portal pulls from and it does create it's own record for the first record in the portal but that's it. It's the same as when I view the Safety Clearance layout in table view. All the fields in the main table are there, then there's the info from the first record in the portal. How do I get the rest of the portal records?

BTW, my 'about me' section has a description of the database this is for and I have an album of screen shots that may help explain the layouts.

Link to comment
Share on other sites

When I view the records in the main table in browse mode/table view

Table view and portals do not go together. Switch your layout to form view.

When I tried to make a new layout for just the portal

I think you mean a layout of the child table. A "portal" is a layout element allowing you to view multiple child records on a layout of the parent table.

Link to comment
Share on other sites

I think you mean a layout of the child table. A "portal" is a layout element allowing you to view multiple child records on a layout of the parent table.

Yes, that's what I meant. I need to print a page of labels for the child records in a given main record.

I set up a new layout with the fields from the child record and when I view it in preview mode it shows the first child record from each main record. How can I display JUST the child records from ONE main record, and show ALL of those child records at once? So far, the only view/mode I can see all the child records in at once is the browse mode/layout view for the main record. But I need a layout for printing the labels that shows all the child records for that main record and not other records.

BTW, thanks for all your help Comment. You keep chiming in on all my threads and I appreciate the help.

Link to comment
Share on other sites

How can I display JUST the child records from ONE main record, and show ALL of those child records at once?

Filemaker has a shortcut* for this action - it's a script step called Go to Related Record[]. You can place a button on the parent layout and define it to GTRR [ from table Child; using layout "Child Labels"; Show only related records, Match current record only ].

---

(*) it's a shortcut for performing a find in the child table for a matchfield value equal to the current parent record.

  • Like 1
Link to comment
Share on other sites

OK, well the GTRR script managed to do in one step what I had already written another script for that took several steps. But I still only see the first child record from all the main records.

I tried the various options with "show only related records" unchecked, then checked (and with both sub-options checked/unchecked).

Link to comment
Share on other sites

Also, if I try to FIND all the records from the portal it only shows one record. I went to my label layout and entered an actual Safety Clearance # in the field from one of the records. When I performed the find, it only shows the first child record for the portal.

Link to comment
Share on other sites




As you can see in the Safety Clearance sheet, Safety Clearance # OP11072 has nine child records in the portal table for the isolation points. But when I use the GTRR script I get only the first child record from many different Safety Clearance #s, instead of ALL the child records for ONLY that SC#. Maybe it's a relationship problem between the Safety Clearance table and Isolation Points table.
Link to comment
Share on other sites

Does this work for you?

It does it your file, but when I try to set up a similar button in mine, I still only get the first child record. I created a button on the Safety Clearance layout and set it to GRR from Safety Clearance, Show record using layout Tag Labels, show only related records and match current record only. I don't know why I'm still getting child records from other parent records, and why I only get one of each.

Link to comment
Share on other sites

That doesn't sound right. If Safety Clearance is the parent table, you need to go to related records from the child table.

But that's not an option for some reason. Under Button Setup>GTRR>Specify>GRR From: All the tables are listed except the portal (child table). I can't link to it. It's not listed as a table. The only way I can link to it is to select the parent table then choose >Show record using Layout: Tag Labels (which is the layout I made that has the info from the child table)

Link to comment
Share on other sites

Are you sure you have a child table?

I'm beginning to wonder! I've only been using FMP for a few days so forgive me if my terminology is off. I have a portal in a layout and I was referring to the set of fields in that portal as a child table. Is that wrong? How exactly would you create a new child table?

Link to comment
Share on other sites

It's definitely a portal. I can see that from the properties and options available. what I meant was, I was unsure if having a portal and having a child table were one in the same. Are the records in a portal considered records of a child table? What tutorial were you referring to?

Link to comment
Share on other sites

Comment-

I reviewed the tutorial and got a little bit out of it but there is very little on portals, and no mention of parent/child tables anywhere in the document. Could you please explain the difference and how to set up a child table, or point me towards a different tutorial?

Link to comment
Share on other sites

Joe,

From reading your posts, I can see that you've fallen victim to the "ease of use" of FM. However, you might just code yourself into a corner without understanding basic principles. We want to help. Asking you to do the tutorial is helping. You need to understand the basics of relationships and at least a "I've heard that term before" of the terms. (Parent vs. Child, portal, filtered value list, global field, filtered relationships, table occurrence, etc.)

I would suggest stepping back and confirming with us that you have a plan for the data model. Start a new thread that tells us what you plan. Draw us a simple ERD (Entity Relationship Diagram). You'll receive much better answers and direction than this design/build by forum approach you seem to be taking.

just my 2 cents,

Barbara

  • Like 1
Link to comment
Share on other sites

Barbara-

Thanks for the advice. I have been reviewing the tutorial and reading a lot of threads. I know I jumped in pretty deep with this project before I had a good understanding of the program but I've used Access so I get the major concepts. It's just a matter of learning the differences and terminology.

As far as the plan, I spent a good bit of time designing it on paper and already have a working database. I just have to get all the little features working that will make navigating and filling out the forms easier. I have a good explanation of the project in my "About Me' section and some screen shots in a gallery.

I know what you mean about falling victim to the ease of use though. I was able to get pretty far in building the database without reading any tutorials or having any previous FMP experience. But now, suddenly I'm at a dead end with several functions/features I'm trying to add and I have to back track to figure out the other options in FMP to implement those changes.

Link to comment
Share on other sites

I reviewed the tutorial and got a little bit out of it but there is very little on portals, and no mention of parent/child tables anywhere in the document.

Try Lesson 10 - Making databases relational. It may not be the best reference there is, but it gives a basic overview on how to define a one-to-many relationship between two tables, and how to use a portal.

Note: "parent/child" is merely a generic term for two tables that have a one-to-many relationship. If you have used another relational database before, you should be familiar with the basic concepts - they are no different in Filemaker.

Link to comment
Share on other sites

Comment-

I read all of lesson 10 and didn't see anything about how to access all the records in the child. I know starting a new thread to re-ask a question is frowned upon but I'm not getting anywhere with this one and running out of ways to ask the question.

I just want to be able to print a page of labels for all the records in the portal that go with the current record. But for some reason all I can get is the first record from the portal. Basically I need to view the records in the portal in list view and have the list show all the records for the one parent record, and not show portal records that go with any of the other parent records.

Would it be possible for me to send you a copy of my database and meet you in the chat room? It would be WAY easier to explain my question and understand your replies.

Link to comment
Share on other sites

The forum won't let me attach my database. It says I cannot upload that file type. A restriction for new members maybe?

And since I don't have a working version that DOES show all the related records in the portal, I don't have anything to compare it to. No matter what settings I try, I only see the first record. But if I had something that was working I could figure out the difference on my own, yes.

Link to comment
Share on other sites

The forum won't let me attach my database. It says I cannot upload that file type. A restriction for new members maybe?

No, you just need to zip your file.

And since I don't have a working version that DOES show all the related records in the portal,

I think you do.

Link to comment
Share on other sites

I understand your lack of patients with someone who has such limited knowledge on a subject that you are well versed in, but responding in riddles and half answers kind of defeats the purpose of a help forum. I think I'm doing pretty good for someone that's only been using FMP for 4 days.

Link to comment
Share on other sites

Joe,

In layout mode you will see the name of the TO (relationship) that is used for the portal. This is the relationship that you must use for the go to related records script step.

Barbara

  • Like 1
Link to comment
Share on other sites

Thanks Barbara! Now I'm getting somewhere! I was able to get the script to pull up the child records for that instance of the portal (all the isolation points for that safety clearance). I just have to work on a new layout now. I had the tag out label layout linked to the safety clearance table before so that's what the script pointed to. Once I changed it to the isolation points, I no longer had my layout available but the right records came up. Once I rebuild a similar layout on the other table then I should have it.

Link to comment
Share on other sites

Yes, the label layout should be based on a table occurrence of the child table. You might have just experienced your first "context issue." You wanted to go from the parent to the children. Specially, you wanted to go to the same children that are shown in the portal. So, you need to use the same relationship that you use for the portal.

  • Like 1
Link to comment
Share on other sites

I understand your lack of patients with someone who has such limited knowledge

Please do not speak on my behalf. Not to mention that accusing me of lacking patience after having responded no less than 10 times in this thread, as well as posting a demo file, is kind of ridiculous.

responding in riddles and half answers kind of defeats the purpose of a help forum.

When I posted the demo, I asked "Does this work for you?" and you replied "It does". Now you tell me you "don't have a working version that DOES show all the related records in the portal." That's simply not true, and I don't see how pointing that out qualifies as a riddle or a half answer.

I think I'm doing pretty good for someone that's only been using FMP for 4 days.

Have you noticed you already have 55 posts in the forums?

Link to comment
Share on other sites

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