ADM2 example

Greetings talkers,

I am trying to do something soo simple in ADM(1), I am stuck and would like to be pointed in the right direction. Hopefully with example source. I have a Smart Win that is my container-source. I have dropped a SmartBrowser onto the container also I have dropped a DataSource (Smart Query). The Smart Query is linked to the SmartBrowser to be the data source. When I double click a row in my SmartBrowser I would like that row to be in the record buffer so I can refer to those fields. What do I add to the trigger in the browse to tell Progress to fetch that record from the DB? I will have to run a procedure in my query to fetch that record because only the query can access the database so what would the common method / syntax I require be?
Regards
 
I've done this in the Default Action procedure of the browse.
My program calls an enquiry screen when you double click on the browse.
To get the value to pass to this screen I used this code...

xxxxxx = rowobject.yyyyyyy:SCREEN-VALUE IN BROWSE br_table

where yyyyyyyy = the name of the field in the browse I want to refer to.

I then call the program.

Hope this helps a little

Paul
 
RE >>: xxxxxx = rowobject.yyyyyyy:SCREEN-VALUE IN BROWSE br_table
This is a rather dirty method is it not? All you are asking Progress to do is FIND the record where using the ATTRIBUTE, SCREEN-VALUE matches. This is rather ambiguous, what if there are many; you need to have a unique field to do it this way. You are also not trapping for finding multiples…
Thanks for the help though if you are using this method in your application then you are in for serious problems, your app sounds like it is sooo dirty, it just functions adequately enough and is not using the PSC way.
 
A LITTLE help indeed. I am sorted now for the time being I will explain.

There are records displayed in a SmartBrowse, I wish to have the selected record when double clicked to also be in the record buffer. I CAN NOT use screen-value attributes because they MAY not be unique, giving ambiguoity. I need an old school ** cust num ** / entity num which is a unique identifier. I can use SCREEN-VALUES initialy but when I tell Progress to put the record in the record buffer I require a FIND which is where it can become ambiguous, eg do I FIND FIRST?
I need to use an entity_num which would be indexed. However I do not which to see this in the SmartBrowser, how can I still achieve double clicking a row (entity) and have that record in the buffer WITHOUT having the overhead of having to display an entity_num in my browser?
Regards
 
In the field editor of the SmartDataBrowser add the entity_nr field and uncheck the visible attribute. That way the column is not displayed but the information is available to you via the SCREEN-VALUE attribute.
 
Back
Top