1 Reply Latest reply on Aug 4, 2013 4:26 PM by philmodjunk

    Trying to duplicate many new records by using Duplicate Record/Request in a script.

    Ronnimmer

      Title

      Trying to duplicate many new records by using Duplicate Record/Request in a script.

      Post

      I am trying to duplicate the current  record multiple times(and assigning serial numbers to the new records)

      I am using Duplicate Record/Request based on a field in the record in a loop and it just keeps going on and on.

      The current record has the amount of new duplicates to produce ( Inventory adding products by assigning serial number)

                      

            

        • 1. Re: Trying to duplicate many new records by using Duplicate Record/Request in a script.
          philmodjunk

               Chances are that the fact that duplicate record makes the newly created record the current record and locates that record at the end of the found set is why your script has failed.

               You may need to duplicate a record and then omit it to remove it from the found set and use go to record [first] to return to the original record, then you omit that record as well when your script has finished duplicating it.

               Then you use exit If to exit the loop--exiting the loop when the found count is zero.

               But to be sure would require you to post your script:

               To post a script to the forum:

                 
          1.           You can upload a screen shot of your script by using the Upload an Image controls located just below Post A Answer.
          2.      
          3.           You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here. (with this approach, you can get multiple script steps on the same line, please edit the pasted text by inserting some returns to separate those steps.)
          4.      
          5.           If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
          6.      
          7.           If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.