3 Replies Latest reply on Mar 8, 2012 6:05 AM by philmodjunk

    Set/Get next serial value



      Set/Get next serial value




      I have a problem getting set / get serial value to work. 

      Im trying to create a new record in a linking table when a contact is choosen from a value list  with a script. 

      When the field with the contact is validated im trying to get the primary key in the linking table to autogenerate the next serial key but as i mentioned, im having problems. 

      Been googleing the function to see some examples but there isnt much out there. 
      Anyone know how you use the function who cares to explain it to me?


      Thanks in advance!

        • 1. Re: Set/Get next serial value

          You shouldn't need these to get a serial number assigned to a new record. Using them in a script risks generating records with duplicate values if you have two or more users doing this at the same time.

          If you have defined a field to auto-enter a serial number, simply creating (or comitting if you specify that option) a new record will enter a serial number into the field of the new record--no use of these functions nor any scripting needed.

          • 2. Re: Set/Get next serial value


            Didn't work first, got a message about missing value in the id field but now it works.

            • 3. Re: Set/Get next serial value

              When you add a field with an auto-entered serial number, existing records will not automatically get the serial number. You'd have to update them before they'd have a serial number. Replace field contents in the Records Menu has an option for entering serial numbers and updating entry options that serves well for such an update of existing records.