Alpha Video Training
Results 1 to 3 of 3

Thread: Previous not "locked" to "Auto"

  1. #1
    Member
    Real Name
    Richard A. Froncek
    Join Date
    Jun 2001
    Posts
    399

    Default Previous not "locked" to "Auto"

    Thanks mainly to Tom Cone I finally got the calc with a previous field working. However, an unexpected problem has arisen. I would assume (Yes, it's true! (parsing)) that the calculation would be based on the records as auto-incremented. In ascending mode, this works fine. However, in reporting, it is desired to review only the last 'x' number of records in descending order, i.e., most recent (last), first. Apparently 'previous' does not always mean 'previous.' When the order is specified as descending the calculation does not work,i.e, the result is one record off. Switching the order of subraction of course only alters the sign, either way the result is attached to the "wrong" record. My question therefore is, why doesn't previous act as one would expect and not be altered by reversal of the sequence? Isn't it logical to expect it to relate to the auto-incremented sequence?

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default RE: Previous not

    Richard,

    You probably should dust off the manual, and get acquainted with the details of the Previous() function. It's discussed in the Expression function Reference. You'll find that it can take an optional argument to specify the desired index tag, otherwise it uses the current index sort order. But don't take my word for it, look it up yourself. The example included in the text will be useful to you.

    -- tom

  3. #3
    Member
    Real Name
    Richard A. Froncek
    Join Date
    Jun 2001
    Posts
    399

    Default RE: Previous not

    Thanks again.
    Dick

Similar Threads

  1. Dialog "Auto Advance"
    By Louis Nickerson in forum Web Application Server v6
    Replies: 2
    Last Post: 04-15-2005, 03:25 PM
  2. "auto-fill" records in a separate table
    By Brian Pattenden in forum Alpha Five Version 5
    Replies: 7
    Last Post: 03-11-2003, 11:36 AM
  3. "Previous" value won't Post to field
    By Sid Frasier in forum Alpha Five Version 5
    Replies: 8
    Last Post: 01-21-2003, 03:15 PM
  4. "Auto naming" a file
    By Bill Hardister in forum Alpha Five Version 4
    Replies: 3
    Last Post: 01-02-2003, 02:34 PM
  5. When Save removes (previous,"") data fro
    By Don Reed in forum Alpha Five Version 4
    Replies: 0
    Last Post: 08-08-2000, 10:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •