Default Processing
In default processing, any blank fields in the component are set to their default values. You can specify the default value either in the record field properties or in FieldDefault PeopleCode. If no default value is specified, the field is left blank.
Note:
In PeopleSoft Pure Internet Architecture, if a user changes a field, but there is nothing to cause a trip to the server on that field, default processing and FieldFormula PeopleCode do not run. They only run when another event causes a trip to the server.
Default processing is relatively complex. The following two sections describe how default processing works on the level of the individual field, and how default processing works in the broader context of the component.
Field-Level Default Processing
During default processing, the Component Processor examines all fields in all rows of the component. On each field, it performs the following:
-
If the field is set to NULL (blank) for a character field, or set to 0 for a numeric field, the Component Processor sets the field to any default value specified in the record field properties for that field.
-
If no default value for the field is defined in the record field properties, then the Component Processor initiates the FieldDefault event, which triggers any FieldDefault PeopleCode associated with the record field or the component record field.
-
If an error or warning executes in any FieldDefault PeopleCode, a runtime error occurs.
Important:
Avoid using error and warning statements in FieldDefault PeopleCode.
The following flowchart explains the logic of Field-level default processing where in the Component Processor examines all fields in all rows of the component in a sequence flow.

Default Processing on Component Level
Under normal circumstances, default processing in a component is relatively simple: each field on each row of data undergoes field-level default processing. For typical development tasks, this is all you need to be concerned with. However, the complete context of default processing is somewhat more complex.
See Default Processing.
During component-level default processing, the Component Processor performs these tasks:
-
Field-level default processing is performed on all fields on all rows of data in the component.
-
If any field is still blank and any other field in the component has changed, field-level default processing may be repeated, in case a condition changed that causes default processing to now assign a value to something that was previously left blank.
-
The FieldFormula Event is initiated on all fields on all rows of data in the component.
This PeopleCode event is often used for FUNCLIB_ (function library) record definitions to store shared functions, so normally no PeopleCode programs execute.
-
If the FieldFormula Event changed anything, field-level default processing is performed again, in case FieldFormula PeopleCode changed a field value to blank, or changed something that causes default processing to now assign a value to a field that was previously left blank.
Because there should not be any FieldFormula PeopleCode, this is unlikely to affect the development process or performance.
-
If any field is still blank and any other field in the component has changed, field-level default processing is repeated.
The following flowchart explains the logic of Default processing on component level.
