5 Replies Latest reply on Jun 20, 2012 1:30 PM by MikeSwanson

    Portal Listing items from Repeating field

    MikeSwanson

      Title

      Portal Listing items from Repeating field

      Post

      Hi, Using FM12 (Windows) and i am stuck on problem which i am sure i came across before.

      I Have a products table with a repeating field (6) which holds item numbers. These numbers refer to other item numbers in products2 table linked by ProdID = SubProdID. Purpose of which = eg ProdID 14700 will consist of 4 other items held in the same table, ProdId 15667 and 15765.

      The portal on record for ProdID 14700 needs to show 15667 and 15765 in its lines of info

      The repeating field only holds a max of 6 entrys but how do i get the portal to see all the repeating fields data ?

       

      Any help/ pointers appreciated.

      Mike

        • 1. Re: Portal Listing items from Repeating field
          MikeSwanson

           sorry that should say above ......   14700 consists of 2 items    NOT 4 ..

          • 2. Re: Portal Listing items from Repeating field
            philmodjunk

            Are Products and Products2 the same table or different occurrences of the same table?

            Products::ProdID = Products2::SubProdID

            Looks like two different tables to me, but when you use the duplicate button in Manage | Database | Relationships to create a new occurrence of an existing table, it'll put a 2 after the original name so I'm checking to be sure.

            What is the name of your repeating field and in which table is it defined?

            I recommend that you not use a repeating field for this. a related table will be more flexible and can still be used to list items in your portal without limiting you to 6 items.

            • 3. Re: Portal Listing items from Repeating field
              MikeSwanson

              Hi, 

              Yes the Products2 table is an occurence of the Products table.  

              The Products table holds items which we us on their on but also the table holds Products that actually consist of 3 or 4 single items from the Same Products table.  EG   Mic kit consists of 1xmic, 1xcable, 1xplug

              In the Products table i have a field (repeating at moment) that i thought could be used to link these items ProdSubID(6)

              So i can fill these fields in on the 'Mic Kit' record with id's for the mic, cable and plug

              Hoping then to show these in a portal on the record for the Mic Kit. So we can easily see if these are 'Instock', 'Price' ETC or what ever fields

              we put into the portal design.

              The Mic can of course be sold/used on its own. So its just the record for the Mic Kit that needs to show the components required.

              My fields are ProdID for each item, ProdSubID in the main table so i can link (up to 6 at minute) sub parts.

              Have done away with the repeating field now but still not sure how to show the ProdID's for seperate items on the portal.

              Thanks

               

              Mike

               

               

              • 4. Re: Portal Listing items from Repeating field
                philmodjunk

                We've dealt with "kit" and "boxed set" issues here before. There's more than one way to set this up--it depends on how you want to list things on the invoice--both for data entry and printing.

                The main issue I see with your current approach is not using a repeating fields--that should work, but in that you'll have an empty repeating field for "non kit" products and empty, unsused repetitions for those kits that don't need every one.

                I'd set it up like this:

                customers---<Invoices----<LineItems>-----Products----<KitItems>----KitProducts

                Products::ProductID = KitItems::KitID

                KitProducts::ProductID = KitItems::ProductID

                Products and KitProducts are occurrences of the same table.

                What we've figured out in previous threads on this subject is to use a script that is performed after selecting a product in a lineItems portal that:

                1) checks to see if product is a kit

                2) If a kit, pulls of list of ProductID's from KitItems

                3) Creates one record for each kit Item in the line Items portal

                Since all items are now listed in line items, determining quantity on hand works for items purchased indivdually and through kits in exactly the same way.

                The individual differences are in how you show and compute a price. The kit entry can be a zero price item with the individual items listing a price or you can make the kit items have a zero price and show a price for the kit.

                • 5. Re: Portal Listing items from Repeating field
                  MikeSwanson

                   Yep Thanks for that...

                  Got it working fine now, just need to sort out getting the correct info on printouts from more than one portal.

                  Need to have our copy of Job sheet listing all items and then customers listing just the main parts and prices

                  for all items.

                  Thanks for your help.

                   

                  Mike