Kbase P30654: Dynamics Calculated Field remains blank on the SDV based on
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/07/2003 |
|
Status: Unverified
FACT(s) (Environment):
Dynamics 2.0A
SYMPTOM(s):
Dynamics 2.0A01
Dynamics 2.0A02
Calculated Field remains blank on the SDV based on SBO
One SDO in the SBO has a calculated field
CAUSE:
Bug# 20030710-022
CAUSE:
As said on Posse for IZ# 11123, the problem was due to calculated field missing in the displayedFields property of a SDV based on SBO.
So the SBO does indeed get the calculated field values in his rowObject Temp Table, the problem is that the SDV is not displaying it.
FIX:
In Super procedure of the dyn Viewer based on SDB, make override of initializeObject and add the following before RUN SUPER, in order to fix the dislayedFields property by making sure that the calculated field is included in the list:
DEFINE VARIABLE cdf AS CHARACTER NO-UNDO.
DEFINE VARIABLE CalcFieldToAdd AS CHARACTER NO-UNDO.
CalcFieldToAdd = "<SDOName>.<CalcFieldName>".
cdf = DYNAMIC-FUNCTION('getDisplayedFields':U IN TARGET-PROCEDURE).
IF LOOKUP(CalcFieldToAdd,cdf) = 0
THEN cdf = cdf + (IF cdf = "" THEN "" ELSE ",") + CalcFieldToAdd.
DYNAMIC-FUNCTION('setDisplayedFields':U IN TARGET-PROCEDURE, cdf).
RUN SUPER.
Example for <SDOName>.<CalcFieldName> : "hrmdefullo.calctime". Do not be confused by <SDOName>, this is indeed just the name used by the ADM2 to handle the calculated field in the SDV, but the value is indeed coming from the RowObject Temp table of the SBO.