2 Replies Latest reply on Dec 7, 2011 1:43 PM by RayCologon

    Record Counting

    Jason_Farnsworth

      Looking for some advise on how for get Records to number themselves via this format

       

      N0500,N0501,N0502.....N1500,N1501....Etc I do not use this as RecordID it is a field within the table.

       

      I need the first Record to start a N0500 and get progressively bigger. The thing that is getting me is starting with N0500 and counting up from there and when it hits N1000 to roll off the zero.

       

      Thanks in Advance,

       

      Jason

        • 1. Re: Record Counting
          techt

          There are a few ways to do this. Why the initial preceeding 0, and what happens when the number is greater than 9999? One way would be to set up a field that has a serial number incremented by 1, then a calculated field that adds the "N" lead & the number padded to four decimal places. Alternatively, depending on what you're presenting, you could just use a merge field with the leading N and the number.

           

          HTH,

           

          TT

          • 2. Re: Record Counting
            RayCologon

            Jason_Farnsworth wrote:

            ...The thing that is getting me is starting with N0500 and counting up from there and when it hits N1000 to roll off the zero.

             

            Hi Jason,

             

            The calculation expression:

             

            SerialIncrement("N0999"; 1)

             

            will produce the result:

             

            N1000

             

            So, for example, if you have a serial number field in place already, you can reference it an auto-enter calculation using the SerialIncrement( ) function, to generate sequential number strings in the format you require.

             

            Does that help?

             

            Regards,

            Ray

            ------------------------------------------------

            R J Cologon, Ph.D.

            FileMaker Certified Developer

            Author, FileMaker Pro 10 Bible

            NightWing Enterprises, Melbourne, Australia

            http://www.nightwingenterprises.com

            ------------------------------------------------