3 Replies Latest reply on Jun 13, 2017 10:56 PM by philmodjunk

    Import script step, multiple imports,

    mckeefurniturellc

      I have data that I am importing into filemaker, the data is dimensions and material for cabinet parts, My Data is currently in this format; Unit, Dimension Thickness, Dimension Width, Dimension Length, and Quantity of parts.

       

      If i have a cabinet with 2 identical sides and an identical top and bottom and 2 adjustable shelves the parts would show in my list as

       

      Cabinet side, .75, 24, 30, Qty 2

      Cabinet Bottom, .75, 24, 22.5, Qty 2

      Cabinet Shelves, .75, 23, 22.375, Qty 2

       

      When I import this data into my parts file for that cabinet I would like it to Import the Cabinet Side twice, the cabinet bottom twice and the cabinet shelves twice so after the import into the parts file it would look like this

       

      Cabinet side, .75, 24, 30,

      Cabinet side, .75, 24, 30,

      Cabinet Bottom, .75, 24, 22.5,

      Cabinet Bottom, .75, 24, 22.5,

      Cabinet Shelves, .75, 23, 22.375,

      Cabinet Shelves, .75, 23, 22.375,

       

      Depending on what we are drafting or building we may have a quantity of 1 to 100 potentially.  So I need a filemaker script that will import these parts based on the Quantity Fields value, If there are 3 parts it would import that part 3 times, if there were 22 parts it would import that part 22 times etc.

       

      I don't know if I am looking at a Loop Function or what I need to make this happen.

      Thank you

      Adam

        • 1. Re: Import script step, multiple imports,
          philmodjunk

          Import the records once, then use a script with a pair of nested loops. The outer script loops through the original records in the found set created by the import, the inner loop uses duplicate record to make the additional copies.

           

          But consider that maybe you don't need separate records. I can think of a lot of ways to work with just  one record for Cabinet side, for example, but which uses the quantity field as needed to get the needed results without actually duplicating the record.

          • 2. Re: Import script step, multiple imports,
            mckeefurniturellc

            I agree that most times there is no need to have individual line items, but we do like to have those line items when we are printing stickers for those parts to be cut.

             

            Thank you,

             

            Adam McKee

            Contemporary Woods Furniture

            Store Phone: 402-328-2800

            Store Fax: 402-328-2808

            • 3. Re: Import script step, multiple imports,
              philmodjunk

              And if printing labels is the only reason for duplicating these records, it's not really necessary. Whether printing labels one at a time or using sheets of labels in rows and columns, you don't have to duplicate records--which can create other issues for your solution, just to get the right number of labels printed.