2 Replies Latest reply on Apr 1, 2015 7:09 AM by Stu412

    Dynamic auto enterserial?

    Stu412

      Title

      Dynamic auto enterserial?

      Post

      Hi, 

      Not sure how to approach this.  I have a task which generates a whole bunch of new records on a given table.  By design, each time I run the task, it deletes existing records and replaces them with new, updated records.

      I'm using the auto enter serial number in a resulting view.

      Each time I run the task, I want this auto enter number reset to 1.  There's no risk associated here as this field will never relate to anything else.

      Is there a way that I can tell the table involved to always reset to 1 when the script for my routine is run?

       

      Thanks

        • 1. Re: Dynamic auto enterserial?
          philmodjunk

          Option 1, use the Set Next Serial Value script step to reset the serial number field each time you delete all records from the table.

          Option 2, don't use an auto-entered serial number, but rather use Replace Field Contents with the serial number option to number the records. This last option can also be used to reset the serial number even as it numbers them with a serial number.

          • 2. Re: Dynamic auto enterserial?
            Stu412

            Thanks Phil, first option works great - would have taken me forever to find the fact that it even existed as a script step!