Alpha Video Training
Results 1 to 5 of 5

Thread: Browse Sort Order

  1. #1
    Jeffrey Wolfe
    Guest

    Default Browse Sort Order

    I am using buttons as Field Titles in a browse and would like them to sort on that column. I think I can use Order.get command for the order but is there anyway to know whether it is ascending or descending?

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Browse Sort Order

    Not sure why you would want to use .order_get().

    I would think you would want

    "OBJECT".QUICK_SORT( Direction as L )

    Argument
    Description

    Direction
    Optional. Default = .T. (TRUE)



    .T. = Ascending sort.
    .F. = Descending sort.

  3. #3
    Jeffrey Wolfe
    Guest

    Default RE: Browse Sort Order

    Thanks Stan,

    I do believe this is what I'm looking for. I'd like the buttons, which are replacing the column title for the Browse fields, to sort the browse based on the field it represents. For instance, I have a "Customer" field and "Date" field. When the field title button is pressed for the Customer field, it needs to check the current sort order and change it, or if it is the current sort field, change it from Ascending to Descending or visa-versa.

    My question is, what is the syntax for setting the sort order of a browse object on a field in that object?

  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Browse Sort Order

    "what is the syntax for setting the sort order of a browse object on a field in that object? " - that is exactly what I gave you, you just have to supply the "object" part.

    You can use the xbasic explorer, object explorer, or read the documentation and construct your own object name.

    For a form named test with a browse named browse1, with a field named address_1, the syntax is


    test:browse1:address_1.activate()
    test:browse1:address_1.quick_sort()

  5. #5
    BRIAN GRAY
    Guest

    Default RE: Browse Sort Order

    Just thought I'd mention it, you can cheat a bit and use action scripting. If for no reason to see the syntax.

    Brian

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 by Record Order
    By Jeff, Richards in forum Alpha Five Version 5
    Replies: 4
    Last Post: 05-29-2004, 08:14 AM
  4. Preset sort order in browse
    By René Stout in forum Alpha Five Version 5
    Replies: 5
    Last Post: 11-01-2003, 12:33 AM
  5. Sort Order
    By Juli Carey in forum Alpha Five Version 4
    Replies: 7
    Last Post: 11-08-2001, 03:33 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
  •