Kbase P37674: How to check if I am in Add/Copy or update mode?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  22/10/2004 |
|
Status: Unverified
GOAL:
How to check if I am in Add/Copy or update mode?
GOAL:
Am I in update, add or update mode in SDO?
GOAL:
Is this a newly created row in SDO?
FACT(s) (Environment):
Progress 9.1D
FIX:
DEF VAR hRowObject AS HANDLE.
DEF VAR hField AS HANDLE.
DEF VAR hSDO AS HANDLE.
hSDO = DYNAMIC-FUNCTION( 'GetDataSource' IN THIS-PROCEDURE ).
{get RowObject hRowObject hSDO} .
hField = hRowObject:BUFFER-FIELD( 'RowMod':U ).
IF hField:BUFFER-VALUE = "A":U THEN
/* row is newly added */
ELSE IF hField:BUFFER-VALUE = "C" THEN
/* row is newly copied */
ELSE hField:BUFFER=VALUE = "" THEN
/* row is updated */