3 Replies Latest reply on Aug 29, 2010 1:10 PM by LaRetta_1

    Ranking

    LindaBurech

      Title

      Ranking

      Post

      As an educator and a newbee to FMP11, I rank students based upon certain achievement scores.  When I print the list in order of achievement, I use the @@ function to print each student’s ranking.  Once I have their ranking I would then like to print their names alphabetically.  If I rearrange the list alphabetically I cannot keep the original ranking associated with the name. For example:

      Name Score    Rank

      Joe 98 1

      Amy 87 2

      Bob 75 3

      But when I put them alphabetically using @@ I get

      Amy 87 1

      Bob 75 2

      Joe 98 3

      Any assistance would be appreciated.

        • 1. Re: Ranking
          fitch

          Make a field to store the rank. Display the rank field instead of @@. After you sort by score, use the Replace command to replace the rank with serial numbers.

          • 2. Re: Ranking
            sburech

            Thank you for your helpful suggestion.  I created a field called Rank. Under the Auto Enter tab I selected serial number and placed 1 in the next value and incremented by 1.  In the validation tab, I always allowed validation and user override. After I sorted the data based on scores, I replaced the records in field contents in Rank with serial numbers, designated the initial value as 1 and the increment as 1.  The numbers started out consecutively but then produced bizarre results for the 11th an 12th student but them resumed in the proper order as though the correct number was 11 and 12 but a totally out of place number showing in the list.  This problem was repeated several times sometimes repeating out of place numbers but with the correct sequence always reappearing until the 96th record.  Can you think of  what might be happening?  Or how I can clear this problem?

            • 3. Re: Ranking
              LaRetta_1

              Ranking can change and must be performed each time the rank may change.  You cannot use an auto-enter serial; instead use a standard number field and script.

              Script, when you want to update the current rank, would be something like:

              Show All Records

              Sort [ sort by whatever criteria would determine their rank ]

              Replace Field Contents [ rankField ; serial numbers 'custom value' starting with 1, incrementing by 1 ]

              Place this rank field next to the Student Name.