SmartPanel - Add record

I have a smartwindow containing a smartbrowser, a smartviewer and a smartpanel. While updating the fill-in in the smartviewer, how can I know I am now adding a new record or I am now updating an existing record?

I am using Progress 8.3B. Thank you.
 
Actually I want to auto-assign the pre-defined userid to a field when the user commits the adding of a new record.

However, the record seems to be created only when the commit buttion is pressed. How can I do my task? Thank you.
 
Have you considered putting a PreTransactionValidate procedure in your SDO?

You could then

FIND LAST RowObjUpd.
IF RowObjUpd.RowMod EQ "A" THEN
/* coding for add */
ELSE IF RowObjUpd.RowMod EQ "U" THEN
/* coding for update */
ELSE IF RowObjUpd.RowMod EQ "D" THEN
/* coding for delete */


Also, the search browse program I gave you works a lot faster if you unset and set the visible attribute of the browser at the start/end of the Next and Prev button triggers.
 

bussys

New Member
There is a logical system variable called adm-new-record check the value of this. When it's true your adding a record.
 
Top