Consultor Eletrônico



Kbase 16303: Steps for using the Alphabet Button SmartPanel
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
Steps for using the Alphabet Button SmartPanel

INTRODUCTION
============
This knowledgebase entry discusses the steps required
for using the Alphabet Button SmartPanel with a SmartQuery
or a SmartBrowser.

PROCEDURAL APPROACH
===================
1) Add the following to the definitions section of the
SmartQuery or SmartBrowser:

DEF VAR adm-filter-value AS CHAR NO-UNDO.
RUN set-attribute-list ('Filter-Value = ':U + adm-filter-value).

This creates a variable which will contain the filter-value and
be used in the where clause of the open query statement.

2) Create a local-open-query event procedure in the
SmartQuery or SmartBrowser and add the following code before
the dispatch of the standard open-query:

RUN get-attribute ('Filter-Value':U).
adm-filter-value = RETURN-VALUE.

The retrieves the Filter-Value attribute to be used as search
criteria in the open query.

3) The query of the SmartQuery or SmartBrowser must be a
freeform query and should use the variable set from the
Filter-Value attribute in the following way:

OPEN QUERY {&SELF-NAME} FOR EACH Customer WHERE
name BEGINS adm-filter-value NO-LOCK
~{&SORTBY-PHRASE}.

4) Create a local-initialize event procedure in the
SmartQuery or SmartBrowser which includes the following:

RUN modify-list-attribute IN adm-broker-hdl
(THIS-PROCEDURE,
"ADD",
"Supported-Links",
"Filter-Target").

This makes the object a Filter-Target which the link
advisor will recognize.

5) The following link will need to be set up with the
link advisor to link the Alphabet Button SmartPanel to
your SmartQuery or SmartBrowser:

Source - Alphabet Button SmartPanel
Link Type - Filter
Target - SmartQuery or SmartBrowser


Progress Software Technical Support Note # 16303