5 Replies Latest reply on Apr 26, 2011 12:38 PM by philmodjunk

    Viewing entries from the current table related to a relation?

    MarkBradbury

      Title

      Viewing entries from the current table related to a relation?

      Post

      Hi There

      I'm only a few days into filemaker pro, having come across from dabbledb. Loving it so far, although lots to learn.

      I'm not a database wizz, but have a basic knowledge of what I want without understanding the underlying code.

      I have a database with several related tables. Is it possible to view all entries in the current table that are related to related entries in a different table? For instance, in my case I have termly class entries related to children, related to parents and I want to view in the class table entries for other siblings who have class entries. I am getting used to portals, but can't seem to find a way to view info in the same table in this way.

      Sorry, this isn't explained very well, but I'm sure you'll get my drift.

      Any help greatly appreciated.

      Many thanks

      Mark

      Screen_shot_2011-04-26_at_20.10.35.png

        • 1. Re: Viewing entries from the current table related to a relation?
          philmodjunk

          Much depends on how you've related your tables. You might want to click the Edit Post link to your original post and upload a screen shot of your relationship graph from Manage | Database | Relationship.

          • 2. Re: Viewing entries from the current table related to a relation?
            MarkBradbury

            Thanks Phil

            I've uploaded a screenshot above.

            Many thanks

            Mark

            • 3. Re: Viewing entries from the current table related to a relation?
              philmodjunk

              So which table is the "current table" and from which table do you want to see data? (I don't see any parents table, but you say "related to parents" in your original post...)

              Do each of these "boxes" refer to separate tables in the tables tab or are any of these table occurences of the same table?

              • 4. Re: Viewing entries from the current table related to a relation?
                MarkBradbury

                Sorry, for 'parents' read 'carers'. 

                Re: your question above, each of these boxes in the picture refers to a separate table.

                I have updated the picture above by scrolling down within one of the 'boxes' to show more clearly the appropriate fields.

                I see the 'carers' table as the parent. So, what i really want to be able to do is to view a summary of totals from any records in the field 'Full_Fees_Sum11' in the table 'Summer11Horsham' that relate to the same record in 'CarersHorsham'. Ideally I would like to then add these together within the 'carers' table and ultimately create an entry in the 'debts' table that mirrors this and would allow similar entries from future tables that would apply to different class terms. I am then planning to have another table to cover payments and hopefully then I can balance debts and payments to show me what sums are owing. Does the (updated) structure above look a little dodgy?

                Bare with me, this is going a lot deeper than I'm used to.

                Many Thanks

                • 5. Re: Viewing entries from the current table related to a relation?
                  philmodjunk

                  Not speaking the same language leaves me unsure about the purpose of each table and how they are related.

                  If you have a layout for CarersHorsham and want to see a list of related records from Summer11Horsham, You can place a portal to Summer11Horsham on your layout. You will only see records in this portal if you have at least one record in ChildrenHorsham that links records in Summer11Horsham with CarersHorsham.

                  To see values on your CarersHorsham based layout that combine values from a related table, you can define calculation fields in CarersHorsham that use aggregate functions such as Sum, Count, Average. You can also define summary fields in the related field that compute the same values and you can place them on this layout, inside the portal or even inside their own one row portal--a useful trick when using a portal filter to limit the records shown in the portal.