Kbase P22645: How to create a simple SmartDataField
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  03/04/2003 |
|
Status: Unverified
GOAL:
How to create a simple SmartDataField
FACT(s) (Environment):
Progress 9.1x
FIX:
The following are the minimum steps needed to create a SmartDataField, the example is a SmartDataField with one fill-in on it:
1- Create a new SmartDataField from the 'New' button in the AppBuilder.
2- Drop off a fill-in on it. This fill-in will display the field value.
3- Add code in the setDataValue function like the following code:
ASSIGN fill-in-1:SCREEN-VALUE IN FRAME {&FRAME-NAME} = cValue.
4- Add code in the getDataValue function to return the SCREEN-VALUE Of the fill-in.
5- Add code in the enableField and disableField procedures in order to enable and disable the fill-in together with the other objects in the SmartDataViewer.
The code should be like the following:
ASSIGN fill-in-1:SENSITIVE IN FRAME {&FRAME-NAME} = TRUE.
5- Add the following code to the VALUE-CHANGED fill-in trigger:
DYNAMIC-FUNCTION('setDataModified':U, INPUT TRUE).
The functions are procedures mentioned above are already created by the AppBuilder.