2 Replies Latest reply on Jun 5, 2014 9:23 AM by pastormarkfuss

    Help with showing related record details

    pastormarkfuss

      Title

      Help with showing related record details

      Post

           I am quite new to FileMaker, having been using it for just over a month now. I have read quite a bit of documentation and watched a number of helpful videos in an attempt to learn more about the program. I am very much a novice at FileMaker and I have run into a bit of an issue and I hope that a more experience user can help me to resolve.

           I am trying to do something that seems, in my mind at least, to be relatively simple. I want to design a layout that incorporates a portal on the left side of the layout and details about the selected or active portal row on the right side of the layout. The solution I am trying to build is for my church. The portal on the left side of the layout displays a list of church families by household. On the right hand side of the layout I want the details for the currently selected household to display [things such as address, telephone number, etc.]. I can get the portal to display without any problem. The trouble I am having is with the details display on the right hand side of the layout. The details that I want to display will show up only for the topmost household in the portal.

           I have attached  a screenshot of what I have been able to come up with so far.

           Does anyone have an easy solution for my dilema? Please bear in mind that I am both new to FileMaker and I am not a programmer/developer, so I'll need a simplified answer.

            

           Thanks.

      Snap92.png

        • 1. Re: Help with showing related record details
          philmodjunk
               

                    I am both new to FileMaker and I am not a programmer/developer,

               Well that's does not need to be a permanent condition. wink

               Bear with me. I'm going to post something pretty technical, but I'm also going to include links that you can click to learn more if a part of what I post doesn't make sense and feel free to use Post a new Answer to post follow up questions on parts that still do not make sense.

               First, the relationship you should have for your portal:

               LayoutTable>----X----<Households

               LayoutTable::anyField X HouseHolds::anyField

               For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained

               I'm calling the table you'd use for this layout "LayoutTable" and the table that stores the details for each Household and the table on which your portal is based, HouseHolds. We'll only need one record in LayoutTable for this to work. You can use literally any field in LayoutTable to match to literally any field in Households to make this work. But you have to double click the relationship line to open a dialog box where you can change the = operator to the Cartesian join operator: X. This matches any record in LayoutTable to all records in Households.

               To show the details that you want when clicking a portal row (or button placed in the portal row), we'll need to add a second relationship from LayoutTable to a different Tutorial: What are Table Occurrences? of Households.

               LayoutTable------HouseHolds|Selected

               LayoutTable::_fkSelectedHouseHoldID = HouseHolds|Selected::__pkHouseHoldID

               With this added table occurrence and relationship, you can add fields from HouseHolds|Selected to your layout to show the detail fields that you want to the right of your portal. You can then either add a button to the portal row or select all the fields in the portal row and use button setup.. to turn that group of objects into a button. The button can perform this simple script:

               Set Field [LayoutTable::_fkSelectedHouseHoldID ; HouseHolds::__pkHouseHoldID ]

               When Setting up Set Field, there are two Specify buttons that must be clicked. To get Set Field [Table::Field ; Expression], add set field to your script and click the first button (specify target field). Select Table::Field from the list of fields. Do not click the specify button next to the repetition box. Click OK to close this dialog box. Now click the lower specify button (calculated result) and create the expression to the right of the semicolon (;). Do not try to type in the semicolon.

          • 2. Re: Help with showing related record details
            pastormarkfuss

                 Thank you so very much. That works wonderfully!