Consultor Eletrônico



Kbase 15511: How to programatically pick a column for column-searching
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
How to programatically pick a column for column-searching

An editable browse provides a columnar search where you can use your
mouse to click on a column heading and then type a letter. The browse
will search through all the records until it finds the FIRST one in
that column that starts with that letter.

If you would like to choose the search column via the 4gl as opposed
to using the mouse, you can do the following, say, in a button
trigger:

def var cur-col as handle.
cur-col = address2:handle in browse browse-1.
apply "entry"to cur-col.
apply "start-search" to browse browse-1.

At this point you can type the letter to activate the search for the
address2 column.

Some users create an editable browse and then immediately change all
of the editable fields' read-only attribute to TRUE. This provides
the users with the columnar search feature but still ensures that
end users will not be able to change data in the browse. You can
still choose the search column in the 4gl by having the following
code in your trigger.

def var cur-col as handle.
address2:read-only in browse browse-1 = false.
cur-col = address2:handle in browse browse-1.
apply "entry"to cur-col.
apply "start-search" to browse browse-1.
address2:read-only in browse browse-1 = true.

Progress Software Technical Support Note # 15511