Handle problems

gander

New Member
This is simple, but I forgot how to do it. I have a frame containing an SDO, a smartbrowser and a smartviewer - your standard maintenance program. I have some buttons in the smartviewer and want to be able to change the selection crieteria in the query when one or other of them is clicked. How can I run a procedure inside the smartbrowse from a trigger in the smartviewer?
 
Greetings,
You failed to identify the Progress version, whether or not using Smart Objects & the ADM,ADM(1) or ADM 2.
In the Smart Viewerbehind the triggers (buttons,radio,combo) PUBLISH an event, eg PUBLISH 'newQ'. In the Query object SUBSCRIBE to 'newQ'. For the procedure newQ that you will use to subscribe simply change the criteria, and reopen the query this will refresh the browse.
 

gander

New Member
Almost there

I'm using 9.1D with smart objects. I've figured out most of it, but am still having a problem with QUERU-PREPARE. I want to insert a parameter in the "where" clause. I remember doing it by creating a string but I can't remember exactily how I accomplished it.
 

jke

New Member
I think this is what you need (quick and dirty example):

Code:
cQuery = "For each table where table.field = 'something' and table.otherfield = 'somethingelse' ". 
dynamic-function('setQueryWhere':u in h_nameofsdo, input cQuery).
dynamic-function('openQuery':u in h_nameofsdo).

If you do not yet have the handle for the SDO you can get it using a call. I think it's getDataSource (in adm2/smart.p), in the section editor, there is a button to insert the calls that gives you the posibilitys if I'm wrong.
 
Top