AnsweredAssumed Answered

Help with a script

Question asked by fmpro_novice on Jul 31, 2014
Latest reply on Aug 6, 2014 by fmpro_novice

Title

Help with a script

Post

     For each record, I have a field called Place and a field called Total.

     The Total field is sorted by Ascending order, and the Place field is a result of the sort order. Ex:

     PLACE        TOTAL

     1                     65
     2                     66
     3                     67
     4                     68
     5                     69
     6                     70
     7                     71

     If the Total fields are all different it is simple to create the Place field. I simply use "Replace by Serial." BUT, if some of the Total fields happen to be the same, then the Place results need to be quite different. Ex:

     1T                   65
     1T                   65
     3                      66
     4                      67
     5T                    68
     5T                    68
     7                      69

     For both of these examples, the starting number is always a 1 or if a tie, 1T and the final number is equal to the total number of records - unless - in a very rare instance - all the Totals would happen to be the same. In this instance, the result would be. Ex:          (Example two is the most normal of all scenarios.)

     1T                 65
     1T                 65
     1T                 65
     1T                 65
     1T                 65
     1T                 65
      

     Does anyone have any idea what a script would look like to accomplish this? If this looks familiar, I posted this a while back, but the script I ended up with did not work.

      

Outcomes