Database Items

Database items exist in the application database and have a computer code associated with them. The application uses this code to find data. All database items are read-only variables.

You can't change database item values within a formula. If you try to write a value to a database item, you receive a compilation error.

You can use database items in formulas and HCM extracts.

Database items are of these types:

  • Static

  • Dynamic

Static Database Items

Static database items are predefined. They include generic information about an employee, such as sex, birth date, and work location. They also include data about other objects, such as the start and end dates of a payroll period.

Dynamic Database Items

The application creates dynamic database items when you create these objects. In the case of flexfields, you must run the Generate Flexfield Database Items process to create the database items.

Object

Description

Elements

The element name is the database item name prefix.

Defined Balances

The balance name followed by the balance dimension name is the database item name.

Formula global values

The global value name is the database item name.

Input values

The element and input value names are the database item name prefix.

Flexfields

The Generate Flexfield Database Items process creates database items for the contexts and segments of your registered HCM flexfields.

Array Database Items

Array database items have an index type of NUMBER with indexes that start at 1 and increment by 1 without gaps. Here's an example:

/* 1 is the starting index for an array database item. */
I = 1
WHILE DBI.EXISTS(I) LOOP
(
  V = DBI[I] /* Do some processing with element at index I. */
  I = I + 1 /* Array database items indexes go up in steps of 1. */
)

You can use the DEFAULT_DATA_VALUE FOR statement to set a default value in scenarios where an array database item returns a NULL value for an element. There can be only one DEFAULT_DATA_VALUE FOR statement for each array database item and it must appear at the start of the formula.

Here's an example of a DEFAULT_DATA_VALUE FOR statement:

DEFAULT_DATA_VALUE FOR A IS 0
INPUTS ARE B, C

Here's an example of an array database item usage error:

 /* Array database item A. */
A[1] = 1
 A = B
A.DELETE(1)
A.DELETE