[Stackoverflow] [Progress OpenEdge ABL] Freeform Query - Get Clicked Column Index

  • Thread starter Thread starter Raphael Frei
  • Start date Start date
Status
Not open for further replies.
R

Raphael Frei

Guest
I'm currently creating a report program with a freeform query.

Some users requested about the possibility of sorting by any of these columns. This part itself is done, and it´s working.

My question is:

Using the BROWSE br:CURRENT-COLUMN, how can I get the index to use into SET-SORT-ARROW()?

This is my working code:

Code:
DO:

    DEFINE VARIABLE hCol    AS HANDLE.
    DEFINE VARIABLE qh      AS HANDLE.

    IF cBrowserSort = "" THEN 
        cBrowserSort = "DESCENDING" .
    ELSE 
        cBrowserSort = "".

    ASSIGN hCol = BROWSE br:CURRENT-COLUMN
           qh   = QUERY  br:HANDLE
           cBy  = "by temp" + STRING(hCol:NAME).

    qh:QUERY-PREPARE("FOR EACH TT-Component NO-LOCK BY " + hCol:NAME + " " + cBrowserSort + ":").
    qh:QUERY-OPEN().
            
    br:CLEAR-SORT-ARROWS().
    
    //br:SET-SORT-ARROW(hCol:NAME, cBrowserSort EQ "Ascending").
        
END.

Continue reading...
 
Status
Not open for further replies.
Back
Top