3 Replies Latest reply on Mar 23, 2017 2:06 PM by macastronomer

    Running Number Field

    macastronomer

      I am trying to make a calculation field auto-enter a running number. This is a daughter table related to a parent table. The daughter field can have 1 or more related records. I need the running number of that related record (not total records).

       

      In other words...

      ___________________________________________________

           Parent Table, key-field, record 1 : 12345

       

           Parent table, key-field, record 2 : 12346

      ___________________________________________________

           daughter table, record #1, related-field : 12345

           running number field: 001

       

           daughter table, record #2, related-field : 12345

           running number field: 002

       

           daughter table, record #3, related-field : 12345

           running number field: 003

       

           daughter table, record #4, related-field : 12346

           running number field: 001

       

           daughter table, record #5, related-field : 12346

           running number field: 002

      ___________________________________________________

       

      I hope this makes sense.

       

      Thanks for the help.

        • 1. Re: Running Number Field
          Jaymo

          Here's a simple example using Auto-Enter and a relationship. I used an example of Company so the running number is based on the company you enter. However, the key for the relationship can be anything you want.

          • 2. Re: Running Number Field
            philmodjunk

            Why do you need this value and how will you use it?

             

            There are options for such a numbering scheme that will perfectly number groups of records as specified dynamically. The sequence would always start with 1 and always number the members of the group sequentially without skipping values. But changing the order of the records within the group, adding or removing records can all change what number is shown with a given record--so these methods are only useful in specific situations.

            • 3. Re: Running Number Field
              macastronomer

              It really is a run number. We have samples that come to our lab and we do reports on them. Generally a sample only goes through once, sometimes twice, and maybe a third time.  Every once in a while we have a client who is running many parts of the same sample.

               

              The daughter table is mainly for reports (but also for opening and closing the same case if need be).

               

              So, if each parent ID had a run number (1, 2, 3...) it would ideally suit our purpose. We could see that a record pertains to the sample, and this report pertains to the first time the sample went through, and that report pertains to the third time the sample was run.