Alpha Video Training
Results 1 to 3 of 3

Thread: sort order from newbie

  1. #1
    Tony Moloney

    Default sort order from newbie

    I am maintaining a set of diabetes BGL levels, indexed by day name e.g. Sun, Mon, Tue etc.
    I would like to sort these by day in my report rather than alphabetically, starting with Sun.
    Is it possible to define my own sort order?

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000

    Default RE: sort order from newbie


    If you have the actual date for each measurement in each record you could use the DOW() function in an order expression.

    DOW() returns an integer indicating the day of the week for the Date_Value specified

    So DOW(Your_date_type_field) would return an integer from 1 to 7, corresponding to the day of the week (Sunday is 1).

    Otherwise, if you just have the day name, you'll probably have to change the structure of the table to include a new field. This field would contain an integer representing the day of the week, and could be populated with an Update Operation using the DOW() function. Once the new field has been populated you'd base the sort sequence on it instead of the day name field.

    -- tom

  3. #3
    Tony Moloney

    Default RE: sort order from newbie

    Thanks for the tip re the extra field. Now why didn't I think of that? I can sure follow all your advice and will see which works best.


Similar Threads

  1. browse sort order
    By geoff m in forum Alpha Five Version 5
    Replies: 3
    Last Post: 09-23-2004, 08:59 AM
  2. Sort order of Sub reports
    By kgilroy in forum Alpha Five Version 5
    Replies: 8
    Last Post: 08-22-2004, 05:17 AM
  3. Browse Sort Order
    By Jeffrey Wolfe in forum Alpha Five Version 5
    Replies: 4
    Last Post: 08-21-2004, 09:32 PM
  4. Report sort order
    By Edward F. Schulz in forum Alpha Five Version 4
    Replies: 6
    Last Post: 11-09-2002, 01:16 PM
  5. Sort Order
    By Juli Carey in forum Alpha Five Version 4
    Replies: 7
    Last Post: 11-08-2001, 03:33 AM


Posting Permissions

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