5 Replies Latest reply on May 9, 2012 1:36 PM by philmodjunk

    Portal help



      Portal help


      Hey guys,


      I'm having a little trouble figuring out how to set this up. I have a table T15_Products, and 22 other occurences of it, T15_Products_CompID_1 through T15_Products_CompID_22.  They are linked:

      T15_Products_CompID_1::ID_Product = T15_Products::CompID_1  through

      T15_Products_CompID_22::ID_Product = T15_Products::CompID_22 in the relationship graph.  All 22 occurences ar linked in manner.


      I have 2 layouts I'm using for linking related or compatible products together.  One is what I call the data entry and the other is a list view that I have sorted in sku_item_code decensing so I can see the different parts on the same layout.  I only use a few fields on this layout to display info of the part.  It has the ID_Product, which is an auto enter unique number, the Sku_item_code, and the part description.  Then I have the 1-22 compID fields.  When I want to relate the parts, I simpy enter the ID_Product of the part in one of the 22 fields, and when I go to the Data entry layout the infomation of that part is now visible on the layout.  What I want to do is have a portal if possible on the data entry layout that will show data from any of the 22 related parts if I link them on the list view layout.


      I think I need to make some sort of flag field and then another occurance in the graph and make a link somehow, and use this for the portal but I'm stuck an how to make the flag to make the relationship with.


      Any help would be appreciated.

        • 1. Re: Portal help


          Am I correct that these relationships are so that a given Product can be linked to up to 22 other product records to show that they are "compatible"?

          I don't think I'd use 22 different relationships for this...

          I'd use a Join table. Not only do you get a simpler relationship graph, you are no longer limited to a maximum of 22 compatible product records.

          Products----<Compatible_Products>-----Products 2

          Products::ID_Product = Compatible_Product::ID_Product_1
          Products 2::ID_Product::ID_Product = Compatible_Product::ID_Product_2

          With this set up, a portal to Compatible_Product with additional fields from Products 2 included on a layout based on products can be used to list all compatible products for a given product record.

          • 2. Re: Portal help

            If I set this up, how would you recomend the best and easyest way to make the relationship (link the products)  a script??

            • 3. Re: Portal help

              Do you mean how to transition your data from the current set up to the new? Yes, that would require a looping script or series of Import Records actions to create the needed records in the join table. If you are unfamiliar with join tables, you may want to investigate this demo file before proceeding: http://www.4shared.com/file/dZ0bjclw/ManyToManywDemoWExtras.html

              • 4. Re: Portal help

                Thanks Phil,


                Got it all working pretty good.  How can I make it so that 

                Compatible_Product::ID_Product_1 and Compatible_Product::ID_Product_2 cannot contain the same ID # on the same record? So i cant accidentally relate the same product to the same product?

                • 5. Re: Portal help

                  A Validation rule could be set up on either ID field as:

                  ID_Product_1 ≠ ID_Product_2