4 Replies Latest reply on Oct 18, 2012 10:52 AM by MarcMcCall

    Help needed with a complex relationship

    MarcMcCall

      Title

      Help needed with a complex relationship

      Post

             Hi All

           Im in need of some help setting up this complex relationship that relates a group of T15_Products to a Group af Accounts, so I can display the Grouped Products on the group of Accouns Via a Portal on Accounts.

            

           Basically creating group contracts of parts I can relate to groups of accounts.

        • 1. Re: Help needed with a complex relationship
          philmodjunk

               That's a rather vague description, but linking a group of records in one table to a group of records in another typically requires using a third, join table to link them. Know how to do that?

          • 2. Re: Help needed with a complex relationship
            MarcMcCall

                 Yes, I under stand I'll need a join table, and possibly 2.  

                 How I'd like this to work is take a list of Products, with a "Contract Price" import it into a Join table. 

                 Have a Group_Accounts Table that has an ID and a Group_Name. On Accounts be able to have a pop up window that selects the Accounts Group, and by selecting the Accounts_Group the corresponding Products are related.  

                 Many Products on Many Groups and One Group on Many  Accounts.  I just cant wrap my head arrounf getting it to link correctly.

            • 3. Re: Help needed with a complex relationship
              philmodjunk

                   Take a look at this demo file and feel free to post back with questions about it: https://www.dropbox.com/s/oyir7cs0yxmbn6i/ManyToManywDemoWExtras.fp7

              • 4. Re: Help needed with a complex relationship
                MarcMcCall

                     Ok I figured out the missing loop.  I had the Many to Many, Groups to Products via the Join table, what I was missing was another accurrance of the join table linked to the accounts that is needed to populated the portal with = idgroups

                     Grp_Accounts_Grp_Products_Join_Table||Products To Accounts Portal||::idgroup = Accounts::idgroup

                      

                     So essentially there is

                     T15_Products::Sku_Item_Code = Grp_Accounts_Grp_Products_JoinTable::sku_item_code

                     Grp_Accounts_Grp_Products_JoinTable::idgroup = Group_Accounts::IDAccount

                     Group_Accounts::IDGroup = Accounts::idgroup

                Grp_Accounts_Grp_Products_Join_Table||Products To Accounts Portal||::idgroup = Accounts::idgroup