1 Reply Latest reply on May 19, 2014 6:14 AM by philmodjunk

    Updating, adding and displaying entries in Portal rows

    MfgMfg

      Title

      Updating, adding and displaying entries in Portal rows

      Post

           Hi, i'm new to filemaker but i know the solution to this question must be in this forum somewhere, still i couldn't find it after two days of searching, so excuse me asking this.

           I have three tables
           - artworks
           - exhibitions
           - contacts

           and a forth "join" table 
           - join
           with fields only for three foreign keys relating to the other tables (and a primary key).

           Artworks can be shown in many exhibitions, and sold by a contact (a gallery) to another contact (a collector).
           Exhibitions do have one or many artworks on display, and do have a contact (address etc.).

           I managed to display a single entry of Artworks in a Portal in the Exhibitions layout and the other way around, a single Exhibition in a portal in the Artworks layout, but i cannot figure out how to display related records automatically (e.g. select an exhibition title from a drop-down menu and then have the exhibition date and venue display automatically in that portal row - this acutally works sometimes but is not updating after changing in the drop-down menu)

           and i cannot figure out how to add a second row to this portal.

            

           Also, I have a suspicion that three tables is one to many to be linked to a join table? Any suggestions towards the general setup of this would be really appreciated. And i hope i'm not mixing up two completely different questions here.
           Thanks in advance!

            

            

       

        • 1. Re: Updating, adding and displaying entries in Portal rows
          philmodjunk

               Are these your relationships?

               Artworks---<Join>-----Contacts
                                       |
                                       ^
                               Exhibitions

               Artworks::__pkArtworkID = Join::_fkArtworkID
               Contacts::__pkContactID = Join::_fkContactID
               Exhibitions::__pkExhibitionID = Join:_fkExhibitionID

               (Substitute your field names for mine)

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

               

                    and sold by a contact (a gallery) to another contact (a collector)

               Does that mean that there are at most, two contacts linked to any one artwork for given exhibition?

               And when you set up a portal, is it a portal to the Join table?

               

                    and i cannot figure out how to add a second row to this portal.

               If you are putting a portal to the join table on your Artworks layout, enable the "allow creation of records via this relationship" option for the Join table in your Artworks to Join relationship. (Double click the relationship line). If you place this portal on the exhibitions layout, enable "allow creation.." for Join in the exhibitions to Join relationship.

               

                    .....a single Exhibition in a portal in the Artworks layout, but i cannot figure out how to display related records automatically (e.g. select an exhibition title from a drop-down menu and then have the exhibition date and venue display automatically in that portal row

               Make this a portal to the Join table on your Artworks layout. You can then add any fields from Exhibition or Contacts that you want directly to the portal row. When you select an exhibition in a drop down on the __fkExhibitionID field, those fields from Exhibition will automatically display data from the selected Exhibition table.

               But given the "star join" between three different tables (if that's what you have here), the results that you see in your portal may not be what you expected. If artwork A is Exhibited at Exhibition 1 at Gallery X and Sold to Customer Y, you'd need two records in your portal, each linked to the same artwork and exhibition, but linked to two different contacts. That works, but may not be the result you wanted.