Using Multiple Labels

This section provides an overview of multiple labels and discusses how to:

  • Add a new label.

  • Delete a label.

  • Select record field labels.

You can define multiple label pairs for any field. By adding multiple labels to a field definition, you can expand its usability and create a more intuitive user experience at the same time.

For example, here you see the Date field with multiple labels.

Image: A date field showing multiple field labels

This example illustrates the fields and controls on the A date field showing multiple field labels. You can find definitions for the fields and controls later on this page.

A date field showing multiple field labels

You could use this field in a student registration application and select the First Day of Classes label. You could also use this field in an application that tracks employee personal information, but select the Date of Birth label. In each case, you use the same field definition but you vary the label to reflect what the user sees and should understand about its context.

The underlying data structure for the field does not change when you change its label. At the database level, the column name in the table is DATE. You are merely manipulating the label to accommodate the context in which you use the field.

The system displays multiple labels in alphabetical order and sorted by label ID. You can sort the labels in a field by double-clicking the column header. The sorting is not saved, but it is helpful for quickly viewing the labels.

Open the field definition in the definition workspace.

To add a new label, enter the label ID, long name, and short name in the last row. Each label can have related language labels. After defining the multiple labels, you can select appropriate labels when designing a record or page. You also can specify different labels in PeopleCode. To add a line feed for Long Name and Short Name, enter \n (backslash and the letter n). For example, work \n month adds a line feed between the words work and month.

When you create multiple labels, the first label ID is the default label . You can change the default label by selecting the Def check box for a different row. Only one label can be the default.

Note: Each label ID must be unique so that each field definition label can be identified separately, and it must be entered using uppercase letters with no spaces.

Open the field definition in the definition workspace.

To delete a label, right-click a field label row and select Delete Label from the pop-up menu. You cannot delete labels that are currently in use. To determine where the label is used, select the label and select Find Definition Reference from the pop-up menu. The results appear in the Find Definition Reference output window.

Access the Record Field Properties dialog box.

Image: Record Field Properties dialog box

This example illustrates the fields and controls on the Record Field Properties dialog box. You can find definitions for the fields and controls later on this page.

Record Field Properties dialog box

For the record definition, the Record Field label ID drop-down list box is available on the Use tab of the Record Field Properties dialog box. The drop-down list box displays the label ID, short name, and long name that you set in the field definition. The default selection is *** Use Default Label ***. The record field label changes automatically whenever you change the default label in the field definition.