Kbase P110627: Validation is not fired for the SmartDataObject if a field has unknown value
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/15/2009 |
|
Status: Unverified
SYMPTOM(s):
Validation is not fired for the SmartDataObject
Records can be saved without firing validation
Field value is set to unknown is submitted
Entering a ? into a Date field will by pass all validation and save the record
FACT(s) (Environment):
Running an SmartDataObject against an AppServer.
ServerSubmitValidation is set to True
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems
CAUSE:
Bug# OE00184456
CAUSE:
When a field is ? (unknown value), no field values are sent through to 'submitValidation' and hence no validation fires.
FIX:
The following code can be added to the bufferCommit procedure in:
data.i in Progress 9.1x ADM2
query.p in OpenEdge 10.x ADM2
It ensures that ? is passed in as empty string and additional fields / values are passed in as expected:
cChangedFlds = RowObjUpd.ChangedFields.
DO iChange = 1 TO NUM-ENTRIES(cChangedFlds):
ASSIGN cChanged = ENTRY(iChange, cChangedFlds)
hRowObjFld = hRowObjUpd:BUFFER-FIELD(cChanged)
cChangedVals = cChangedVals +
(IF cChangedVals NE "":U THEN CHR(1) ELSE "":U) +
cChanged + CHR(1) + /* STRING(hRowObjFld:BUFFER-VALUE) commented out, Workaround*/
(IF hRowObjFld:BUFFER-VALUE = ? THEN '':U ELSE STRING(hRowObjFld:BUFFER-VALUE)) /* Workaround*/.
END. /* END DO iChange */