Smartobject Search DIALOG

emnu

Member
Hello,

How can you make a search dialog on a Smartobject browse V9 object (ex. SDB with customer information (sports db), button which starts lookup dialog window in which search key on customer name, customer country).

I had quit a good example for V8 smartobjects (QUE series -> Using progress V8), but this doesn't work for V9 smartobjects.

The way it was implemented in V8:

* SmartWindow with a smart databrowse on customer. Button
to start customer search dialog implemented in SDB master.
* Non smartobject dialog frame with Query on customer.name
and country. User can search on name/country, recid of choosen
customer is returned as output parameter to the smartbrowse,
if user selected "ok" button in dialog window, the smartbrowse
was repositioned to the choosen recid.

So, code "on choose" of search button in SDB is next:


/* run search dialog and return record id of choosen customer */

RUN findcust.w (output rId, output lOk).


IF lOk THEN DO: /* ok button choosen in dialog */
/* set the smartbrowse widget so it doesn't scroll unless it
has to */
lOk = {&BROWSE-NAME}:SET-REPOSITIONED-ROW
(MAX(1,{&BROWSE-NAME}:FOCUSED-ROW),
'CONDITIONAL':U).
/* Reset the line in de SmartBrowse to the recid and then
notirfy all other RECORD-TARGETS of the event */
REPOSITION {&BROWSE-NAME} TO ROWID rId.
RUN DISPATCH('row-changed':U).
END.

This was quit nice in V8 smartobjects, you could implement a simple non-smartobject releated search dialog window and
reposition the SmartBrowse with the choosen recid from the dialog.
As SDB and Dialog had the same QUery on customer, the recids
always matched. It was also less "overhead" to implement a
simple search dialog without smartobject technology, as a lot
of "smartfeatures" weren't usefull in this search dialog, and
as result smaller code.

With V9 this isn't possible i think, because V9 SMO makes
it possible to run in distributed environment and uses the temp-table technology within the RowObject tt.
So, my question is quit simple, how can i implement in V9 a search
dialog as mentioned above without or with smart technology ?

Thanx For any respons,

Emmanuel Nuyttens
C&C NV Oudenaarde
 
Top