1 Reply Latest reply on Mar 28, 2013 12:49 PM by philmodjunk

    Record number

    GaryVogt

      Title

      Record number

      Post

           I imported a database from Excel.  The records in the Excel file were supposed to be sorted by date.  When I imported them and sorted by date, records 42 and 41 were out-of-order.  Not a big problem, except that I want to get the ending balance from a previous record and use it as the beginning balance of a current record.  

           I used the "Get (RecordNumber)" to get the number of the current record and "Get (RecordNumber) -1" to get the previous record number.  Then I used  "GetNthRecord ( Ending Balance ; Get Record Number Previous )" to get the value of the previous ending balance.

           Everything worked until the 41st record.  In the window in the upper left corner, it says record number 41.  HOWEVER, the "Get (RecordNumber)" is 42.  So, I have a circular computation.  

           QUESTION:  Why doesn't "Get (RecordNumber)" get the current record number?

           Note: I resorted the file using "Ending Balance" as the sort criteria.  "Get (RecordNumber)" doesn't change.

        • 1. Re: Record number
          philmodjunk
               

                    "Get (RecordNumber)" doesn't change.

               If Get (recordNumber) is used in a calculation field, it won't change if the calculation field is stored. Specify an unstored storage option and the field will update when your found set or sort order changes to put the record in a different spot in the found set's sort order.

               Note: this applies to any get function you use in a calculation field.