2 Replies Latest reply on Feb 14, 2011 1:34 PM by CraigFiore

    Duplicate multiple records

    CraigFiore

      Title

      Duplicate multiple records

      Post

      Hello, 

      Can anyone help me find the best way to duplicate multiple records?

      Scenario:

      I have created a Purchase Ordering system based off the FM templet. I have a detail page which holds the basic information, PO number, company name, ship to address etc. 

      On this page there is a portal to my Line Item records. These are the actual products I purchase. 

      If I Duplicate the Detail page, it does not duplicate the items. 

      Thanks

        • 1. Re: Duplicate multiple records
          philmodjunk

          You'll need to use a script to loop through the item records, duplicating each in turn.

          Duplicate Record
          Set Variable [$Invoice; Value Invoices::InvoiceID]
          Go To Record/Request/Page [Previous]
          If [not IsEmpty (LineItems::InvoiceID) ]
             Go To Related Record [Show only related records; From table: LineItems; Using layout: "LineItems" (LineItems)]
             Go To Record/Request/Page [First]
             Loop
                Duplicate Record
                Set Field [LineItems::InvoiceID ; $InvoiceID]
                Omit Record
                Go To Record/Request/Page [First]
                Omit Record
                Exit Loop If [Get (FoundCount) = 0]
             End Loop
             Go To Layout [original layout]
          End If
          Go To Record/Request/Page [next]

            

          1 of 1 people found this helpful
          • 2. Re: Duplicate multiple records
            CraigFiore

            Worked Great. Thank you.