Hi I have an application with loads on browsers and would like a simple solution for sorting the browse using the START-SEARCH trigger (When the user clicks on the column label) and the Sortby-Phrase preprocessor.
In the start-search trigger I want to put something to this extent:
DEFINE VARIABLE lh AS HANDLE NO-UNDO.
ASSIGN lh = {&BROWSE-NAME}:CURRENT-COLUMN.
&scoped-define SORTBY-PHRASE BY lh:NAME
{&OPEN-QUERY-{&BROWSE-NAME}}
Where lh:NAME would be the column the user clicked on.
This Works
&scoped-define SORTBY-PHRASE BY DESCRIPTION
{&OPEN-QUERY-{&BROWSE-NAME}}
Is there anyway to substitute the 'Description' value follwing 'BY' by a variable name so that one procedure would work regardless of what the actual field is called to sort by.
If I am on the wrong path, it will be greatly appreciated if someone can shove me towards the right one .
Any hints, ideas , words of encouragement would be greatly appreciated.
In the start-search trigger I want to put something to this extent:
DEFINE VARIABLE lh AS HANDLE NO-UNDO.
ASSIGN lh = {&BROWSE-NAME}:CURRENT-COLUMN.
&scoped-define SORTBY-PHRASE BY lh:NAME
{&OPEN-QUERY-{&BROWSE-NAME}}
Where lh:NAME would be the column the user clicked on.
This Works
&scoped-define SORTBY-PHRASE BY DESCRIPTION
{&OPEN-QUERY-{&BROWSE-NAME}}
Is there anyway to substitute the 'Description' value follwing 'BY' by a variable name so that one procedure would work regardless of what the actual field is called to sort by.
If I am on the wrong path, it will be greatly appreciated if someone can shove me towards the right one .
Any hints, ideas , words of encouragement would be greatly appreciated.