*--------------------------------------------------------- *-- Ensure this object's alias is in the current work area *--------------------------------------------------------- LOCAL llIsNewAndEmpty, lcFldState *------------------------------------------------------------- *-- "3" identifies an appended record that has not been edited *------------------------------------------------------------- IF CURSORGETPROP('Buffering') != 1 lcFldState = This.GetFieldState(-1) IF NOT ISNULL(lcFldState) llIsNewAndEmpty = lcFldState = REPLICATE('3',LEN(lcFldState)) ENDIF ENDIF RETURN llIsNewAndEmptyWhen presented with an empty view lcField state contains the empty string ... REPLICATE('3',LEN(lcFldState)) ... when presented with an empty string ... returns an empty string ... since one empty string returns another ... viola ... llIsNewAndEmpty = .T. when in fact it's quite empty ... but not very new.
IF CURSORGETPROP('Buffering') != 1 lcFldState = This.GetFieldState(-1) IF .NOT. EMPTY( lcFldState ) AND ; .NOT. ISNULL(lcFldState) llIsNewAndEmpty = (lcFldState = REPLICATE('3',LEN(lcFldState))) ENDIF ENDIFCTBlankenship, MCP, MCSD