Kbase 20358: ADM2- Workaround to Replace the getMandatoryColumns Function
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/16/2008 |
|
Status: Unverified
GOAL:
How to get the database mandatory field names defined in a SmartDataObject (SDO) now that the getMandatoryColumns function has been removed from the dataext.p procedure in Progress Version 9.1B.
FACT(s) (Environment):
Progress 9.1B
SYMPTOM(s):
ADM2
FIX:
The following function returns the data base mandatory field names using the preprocessor variable {&MANDATORY-FIELDS} and the columnDBcolumn function. This function must be defined in the SDO as follows:
FUNCTION RETURNS CHARACTER (/* parameter-definitions */):
/*--------------------------------------------------------------------
Purpose:
Notes:
--------------------------------------------------------------------*/
DEFINE VARIABLE cColmnsMandtry AS CHARACTER NO-UNDO.
DEFINE VARIABLE iColmnsMandtry AS INTEGER NO-UNDO.
DEFINE VARIABLE iAuxlr AS INTEGER NO-UNDO.
ASSIGN iColmnsMandtry = NUM-ENTRIES("{&MANDATORY-FIELDS}":U, " ").
DO iAuxlr = 1 TO iColmnsMandtry:
IF cColmnsMandtry '' THEN
ASSIGN cColmnsMandtry = cColmnsMandtry + ",".
ASSIGN cColmnsMandtry = cColmnsMandtry +
DYNAMIC-FUNCTION('columnDbColumn':U,
INPUT ENTRY(iAuxlr, "{&MANDATORY-FIELDS}":U, " ")).
END.
RETURN cColmnsMandtry. /* Function return value. */
END FUNCTION.