Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


When a Form loads it may be necessary to default some data. There are two ways of doing this.
 

  • providing default values for the Fields in the FAB Workbench 
  • implementing method DETERMINE_INITIAL_FIELD_VALUES

 
           1. Providing default values using the FAB Workbench

 
Using the Fields editor, enter the default value in the 'Default' column


2. Implement method DETERMINE_INITIAL_FIELD_VALUES


Note: default values set in DETERMINATE_INITIAL_FIELD_VALUES overrides any default set in the workbench.

...

Note: for defaulting field values after a form has already been submitted at least once (ie as part of a workflow), implement method DETERMINE_FIELD_VALUES_ON_LOAD
Important: always call the SUPER method in this implementation so that system fields such as the current user name will be determined correctly at run-time.

...

The procedure is to read parameter CT_FIELD_VALUES with the key ZFIELD_NAME equal to the Form field which is to be modified, then set the attribute ZFIELD_VALUE to the desired value.
 
Save and Activate.

3. Implement method DETERMINE_FIELD_VALUES_ON_LOAD

...


This method is used to provide default data and to overwrite existing Form data at various stages through out the Form life-cycle.
 
This method provides a parameter I_HEADER_INSTANCE which allows the method to determine the current state of the Form via fields such as
 

...

 
This method is called once for each field in the form via parameter I_FIELD_NAME and the method may set the value of each field using the parameter E_FIELD_VALUE.
 
A typical implementation is as follows:

...


Info

Filter by label (Content by label)
showLabelsfalse
max5
spacesIFAB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("default","runtime","values") and type = "page" and space = "IFAB"
labelsruntime default values

...

Page Properties
hiddentrue


Related issues