Hi,
I have added this code on the event START-SEARCH event of the SmartBrowser. I did that because I have the same code into another program which runs perfectly - ordering acend and descend for any column for the Browser.
What do I missing here?
DEFINE VARIABLE hCol AS HANDLE NO-UNDO.
DEFINE VARIABLE hSDO AS HANDLE NO-UNDO.
hCol = BROWSE {&browse-name}:CURRENT-COLUMN.
hSDO = DYNAMIC-FUNCTION("getDataSource").
IF DYNAMIC-FUNCTION("getQuerySort" IN hSDO) =
DYNAMIC-FUNCTION("columnDbColumn" IN hSDO,hCol:NAME) THEN
DYNAMIC-FUNCTION("setQuerySort" IN hSDO,
DYNAMIC-FUNCTION("columnDbColumn" IN hSDO,hCol:NAME) + " descending").
ELSE
DYNAMIC-FUNCTION("setQuerySort" IN hSDO,
DYNAMIC-FUNCTION("columnDbColumn" IN hSDO,hCol:NAME)).
DYNAMIC-FUNCTION("openQuery" IN hSDO).
Thanks in advance for any tip.
Kind regards,
rolguin
I have added this code on the event START-SEARCH event of the SmartBrowser. I did that because I have the same code into another program which runs perfectly - ordering acend and descend for any column for the Browser.
What do I missing here?
DEFINE VARIABLE hCol AS HANDLE NO-UNDO.
DEFINE VARIABLE hSDO AS HANDLE NO-UNDO.
hCol = BROWSE {&browse-name}:CURRENT-COLUMN.
hSDO = DYNAMIC-FUNCTION("getDataSource").
IF DYNAMIC-FUNCTION("getQuerySort" IN hSDO) =
DYNAMIC-FUNCTION("columnDbColumn" IN hSDO,hCol:NAME) THEN
DYNAMIC-FUNCTION("setQuerySort" IN hSDO,
DYNAMIC-FUNCTION("columnDbColumn" IN hSDO,hCol:NAME) + " descending").
ELSE
DYNAMIC-FUNCTION("setQuerySort" IN hSDO,
DYNAMIC-FUNCTION("columnDbColumn" IN hSDO,hCol:NAME)).
DYNAMIC-FUNCTION("openQuery" IN hSDO).
Thanks in advance for any tip.
Kind regards,
rolguin