Column Search - Exclude Column

Hi everyone,

following situation:

I have a browse with 4 columns. The query is a freeform query.
The users can sort on each column by clicking the column-header.

How can I exclude column 4 to sort. So that the user can only
sort on the first 3 columns.

Thanks in advance
 
Hi there!

In the START-SEARCH trigger, you can refer to the browse's CURRENT-COLUMN attribute to get the handle of the column the user just tried to sort on.

So, if you wanted to exclude a column called "myColumn", you could do this:

Code:
DEFINE VARIABLE hColumn AS HANDLE      NO-UNDO.
 
hColumn = SELF:CURRENT-COLUMN.
 
IF VALID-HANDLE(hColumn)
AND hColumn:NAME = "myColumn" THEN
    RETURN NO-APPLY.

Hope this helps!

Andy.
 
Ok, it works.

But can I make the column-header disabled so users can't click on this one, but they can click on the other column-headers to sort it?
 
I don't think so. I believe you have to have all the columns "searchable", or none.

If you're looking for a visual cue for your users, some people add a little marker to the column label to show which ones are enabled for column-searching. Not a very elegant solution though.
 
Top