2 Replies Latest reply on Nov 16, 2014 1:42 PM by philmodjunk

    Create Serial numbers starting with the value contained in a field

    fmpro_novice

      Title

      Create Serial numbers starting with the value contained in a field

      Post

      I have a database that creates serial numbers automatically upon record creation. My current serial number is 10,500. I have a global field that shows the current serial number.

      On another layout and table, I have the ability to add to this database. When I add to the database from this layout, I want the new serial numbers to be created based on the global field showing the current serial number.

      Ideally, I could check Serial number, then Next value would be the global field that shows the current serial number, then increment by 1. Is this even possible?

      Can someone tell me how to add a serial number starting with the value in the global field that shows the current serial number?

        • 1. Re: Create Serial numbers starting with the value contained in a field
          SteveMartino

          I think you need some more info. 

          I have a global field that shows the current serial number.

          Why is this necessary?

          On another layout and table, I have the ability to add to this database. When I add to the database from this layout, I want the new serial numbers to be created based on the global field showing the current serial number.

          What are you adding, another record?  How are these records related, if at all?

          Can someone tell me how to add a serial number starting with the value in the global field that shows the current serial number?

          If you answer the first 2 questions, someone can help you figure out your last question, but I really feel this whole concept is incorrect.

          • 2. Re: Create Serial numbers starting with the value contained in a field
            philmodjunk

            I don't see a reason for the global field. You can set up a field to auto-enter serial numbers and not need any starting value in a global or any other kind of field.

            Using a global field like this will have two serious problems:

            In a multi-user database where the database is hosted from another computer, Changes to the global value by one user will not be visible/accessible to other users and the value of the global field will revert to its original value when the user closes the file.

            See this knowledgebase article: http://help.filemaker.com/app/answers/detail/a_id/3604/kw/global

            In a multi-user database, there is a very real chance that two users creating new records at the same time will get new records with matching instead of unique serial numbers