Update panel mode

Jatsad

New Member
I have a smartobject viewer linked to an update panel.
When the user selects update, I only want to enable certain fields in the viewer. When add is selected, all fields will be enabled as is currently the case.

How can this be done?
ie How can I tell when in update mode.

Still using Progress 8.2.
 
Hello
I am not sure if this is what you need but, in the smart viewer add a procedure and click overwrite, choose addrecord.
The default code is run super which will add a record as long as the requirements of the database are met. Being sort of new to Progress, I am not sure of where to put your set sensitive code before or after the run super, you will have to test it.
hope this helps
 
Hello,
mrw, super-procedure don't exist on 8.2. To know if u're on add mode or in update u've to use this kind of adm1 syntax on u're viewer :
DEFINE VARIABLE c-adm-mode AS CHARACTER NO-UNDO.

RUN GET-ATTRIBUTE('ADM-MODE-RECORD':U).
c-adm-mode = RETURN-VALUE.

U've to put this code on the procedure where u want to chooe wich field must be enabled only on add mode.

For example on a local-enable-field procedure, after the run dispatch and the test :
IF c-adm-mode = "ADD"' THEN
DO:

END.

Hope it's help
 
Back
Top