3 Replies Latest reply on Oct 30, 2009 5:10 AM by ninja

    Need help duplicating records for quoting system



      Need help duplicating records for quoting system


      I'm new to this forum.


      I Have been building and using a Customer, rental, sales, invoicing, quoting system database for the 8 months and using it as it grows in scope. Things are actually going well. It is kinda fun, somtimes kinda not. I have found other solutions on the forum. It's great.


      Here is my question.

      I have a Quote table(many quotes for many clients)

      I have a Quote Version table(Many versions for one quote)(many Versions will have many Items)

      I have a Item table(Many items will be in many Versions)

      I have a Line Item table between the Version table and the Item table.

      I add Items to the Line Item table thru a portal on the Version Table form.


      So let's say I have 50 items in the Item line table with a Version record primary key attached to each line.


      So let's say "Quote 1", "Version 1" has 50 items in the Line table (along with all the other quotes and versions lines)


      I would like to duplicate the 50 line items and use them in the next Version without retyping them.


      It would Be the Still "Quote 1" but "Version 2" with the same 50 Items.


      I want to keep all the old versions also


      I'm Stumped. I have learned everything by reading, going to the help, or reading the forums. I'm not a professional but thats why filemaker is great, Even I can build this thing.


      The reason for all this is our customers change there minds all the time and we want to keep all the old versions, because they always say "oh just go back to the one from a couple of days ago"


      My quote system is currently in an Excel Form, works quite well. There we just duplicate a new speadsheet.  But all our customer are in the filemaker. And I need to get the quote system into filemaker.


      Any help would be wonderful. Thank you ever so much



        • 1. Re: Need help duplicating records for quoting system

          Howdy woodnickel,


          I have a similar situation, but with multicontainor production batches (duplicating material requests and the associated line items) and again with final material receipts when the "oh, we need this too" happens.


          Since the needs are different for my two, I do this two ways.  Which makes more sense to your application in your business?



          Trap the existing key in a variable

          Duplicate the quote (giving it a new PKey via autoenter serial)

          trap the new Key in a variable

          Go to the line items table

          find those line items with the old key

          loop through the found line items, duplicating each one and giving the duplicate the new key



          Save each version as a pdf and load it into a containor field

          Note: I on't put it into a containor...in a folder named well works for me...but it could be put in a containor.


          Again, which makes more sense in your situation?

          • 2. Re: Need help duplicating records for quoting system



            Your help was tremendous! Using your #1 version gave me the genisis of what I finnally did. In the Last 36 hours I've had 3 hours of sleep. This is so addicting. I had never done complex scripting before. I now have good experience with Looping , Script Variables and the thought Process involved. It came out tremendous. My employees have never seen me so happy! I was jumping around when it finnally worked!!! I have been struggling in the back of my head for many months on how to make this happen. I must admit there is some joy when it finally does work. Beleive me I had bugs. I kept forgetting to commit the record in my scripting, umunge other many issues.


            Anyways, KUDO's to you and all filemaker nuts!!


            I can't beleive I struggled for so long and here I get on this chat room and my problem was solved in 6 hours.


            Thanks again


            • 3. Re: Need help duplicating records for quoting system

              Howdy woodnickel,


              Very glad to hear of your excitement:)...now get some sleep, your next project needs you to.


              Enjoy the day!