Simple one for you guys ;) (Smart Objects)

KubiaK

Member
Progress 9.1C, Windows 2000

Ok... i have a smart viewer, a smart browser and a smart panel (Save, Update, Duplicate, Delete, etc...).

The Smart Browser displays quick info from one table, and the Viewer allows a more detailed view of the record chosen from the Viewer, with more fields but still from the only same table. All the Smart Links necessary for this simple application are ok. It works.

What i need now is to allow a field in the Viewer NOT to be updated if i can find the record i'm working on in another table (just a simple CAN-FIND), when i use Update in the Smart Panel.

How should i proceed to made this possible ? Shall i define a new type of link between the Browser and the Viewer ?

I think it's an easy one for you, hope you'll help me ;)

Kub.
 
I will assume you're using appserver. If you don't, just ignore the 'in getASHandle' and unbindserver statements.

You should write a function which searches the 2nd table in your SDO:

function findrecord returns logical:

return can-find ('blablabla').

end function.

In the enablefields section of your viewer :
/*Begin Code*/
run SUPER.

assign field:sensitive in frame {&frame-name} =
dynamic-function('FindRecord':U in
dynamic-function('getASHandle':U in
dynamic-function('getDataSource':U))).

run unbindserver in SDO (input ?).

/* End Code */

Please forgive me some typos...
 

KubiaK

Member
I made a mistake

Sorry, i both work on 8.3B and 9.1C but my pb here was for 8.3B, not 9.1C so i can't use SDO...
 
Top