ADM2 SmartDataBrowser Question

sozk

New Member
Hi, I'm pretty new to ADM2 and am having some basic problems with using a smartdatabrowser.

I'm working in verson 9.

I have a container with a SDO and a Smart Data Browser. When the user clicks on the browser, I want to pass that record's rowid back to the container where I can use it as an output parameter in the container itself. I just don't know how to pass the value from the SDB to the container so that the container can use it.

Any help on this is very much appreciated! Have been banging my head against a wall!
 
In the browse widget create a trigger for the event “RIGHT-MOUSE-SELECT-CLICK” this will trap when the user clicks / selects with the mouse. For the trigger this is the part you wish to know which row in the db has been selected to pass to the smart object. Define a variable crow then assign it in the “RIGHT-MOUSE-SELECT-CLICK” trigger. For the trigger code you require something like this:FIND CURRENT tableName NO-LOCK. /* get the selected row*/cRow = STRING(ROWID(tableName)). /* this assigns the selected row to a var*/PUBLISH eventName (cRow). /* you need this bit make the selected row known */Then in the object you wish to know what has been selected so you can use the data simply SUBSCRIBE to eventName. For the subscription trigger you have collected the ROWID. You now have all attributes to that row available.
 
Back
Top