Return to Navigation

Defining a Common Attribute

This section discusses how to define a common attribute and how to:

Page Name

Definition Name

Navigation

Usage

Common Attribute

SCC_CAF_ATTRIBUTES

select Set Up SACR, then select Common Definitions, then select Common Attributes Setup, then select Common Attribute

Create, delete, or modify a common attribute.

CAF Values - LOV Definition

SCC_LOV_DEFN

select Click the Create New CAF Values link or the Open CAF Value Setup link on the Common Attribute page.

Create or modify a list of values for an attribute of a list of values type.

You can create a list of values yourself or you can have the framework retrieve the list of values from either a table or a translate field at runtime.

Access the Common Attribute page (select Set Up SACR, then select Common Definitions, then select Common Attributes Setup, then select Common Attribute).

Image: Common Attribute page

This example illustrates the fields and controls on the Common Attribute page. You can find definitions for the fields and controls later on this page.

Common Attribute page

Continuing with the GENL_MATERIALS record example that was discussed in the Application Designer section, we use the Common Attribute page to create the common attribute - Passport Number - as shown in this example screenshot:

Image: Example of a Common Attribute

This example illustrates the fields and controls on the Example of a Common Attribute . You can find definitions for the fields and controls later on this page.

Example of a Common Attribute

The value that you select in the Attribute Type field determines which fields are available for entry on this page. For example, the CAF Values group box is available only when you select an attribute type of List of Values.

Field or Control

Definition

Common Attribute

Displays the name of the attribute.

You specify an attribute name when you access the page in Add mode.

Delete Attribute

Available only after you save an attribute.

Description

The description that you enter here appears as a label for the attribute in the delivered subpages.

Attribute Type

The Attribute Type determines the type of value that a user can enter for the attribute.

Select:

  • Date: The attribute appears as a date control on the delivered subpages.

  • Time: The attribute appears as a time control on the delivered subpages.

  • Yes/No: The attribute appears as a yes/no field on the delivered subpages.

  • Number: The attribute appears as a number data control on the delivered subpages.

  • Long text: The attribute appears as a long edit box on the delivered subpages.

  • Text: The attribute appears as a regular edit box on the delivered subpages. The maximum number of characters that a user can enter for this type is 50.

  • Short text: The attribute appears as a regular edit box on the delivered subpages. The maximum number of characters that a user can enter for this type is 20.

  • List of values: The attribute appears as an edit box with a lookup icon on the delivered subpages. Users can click the lookup icon and select a value for the attribute. Users can also enter a value in the box and when they tab out, the framework validates if the entered value exists in the list of values. If the entered value does not exist in the list, then the system displays an error message.

Integer Position

Available only when the Attribute Type is Number.

Enter the maximum number of digits that are allowed before the decimal for numeric attribute types. For example, if you enter 3 here and the user enters a value 9934.89 for the attribute, the system returns an error. However, if you enter 3 here and if the user enters a value 993.89, it means the user is entering the number in the correct format.

Decimal Position

Available only when the Attribute Type is Number.

Enter the maximum number of decimal places that are allowed for numeric attribute types. For example, if you enter 1 here and the user enters a value 993.89 for the attribute, the system returns an error. However, if you enter 1 here and if the user enters a value 993.8, it means the user is entering the number in the correct format.

Enable Rich Text Editing

Available only when the Attribute Type is Long Text.

Select this check box if you want enable editing and formatting capabilities for users when they edit the attribute value in the delivered subpages.

Default Value

Available only when the Attribute Type is Short Text, Long Text, Number, Text, or Yes/No. When the Attribute Type is Yes/No, you can set the default value by selecting the Yes or No radio button.

The value that you enter here appears as the default value for the attribute in the delivered subpages.

Default to current date

Available only when the Attribute Type is Date.

Select this check box if you want the system date to appear as the default value for the attribute in the delivered subpages.

Default to current time

Available only when the Attribute Type is Time.

Select this check box if you want the system time to appear as the default value for the attribute in the delivered subpages.

CAF Values

This group box is available only when the Attribute Type is List of Values.

Image: Example of a Common Attribute page for List of Values

This example illustrates the fields and controls on the Example of a Common Attribute page for List of Values. You can find definitions for the fields and controls later on this page.

Example of a Common Attribute page for List of Values

Use the CAF Values group box to define the values in the list.

Field or Control

Definition

CAF Value Setup

Indicates the list of values definition that you have selected for the attribute.

If you enter this page in Add mode, the CAF Value Setup field is blank. You can either use this field to select a list of values that already exists in the system or click the Create New CAF Values link to create a new list of values definition.

Create New CAF Values

Click to access the CAF Values - LOV Definition page where you can define a new list of values for the attribute.

Open CAF Value Setup

This link appears only if the CAF Value Setup field is populated.

Click this link to access the CAF Values - LOV Definition page where you can view or edit the list of values that is selected for the attribute.

Filters

When a common attribute with a List of Values type based on Ad Hoc Values or Table is saved and the associated CAF value setup in the CAF Values - LOV Definition page uses a filter field, the Filters grid is available on the Common Attribute component:

Image: Example of a Common Attribute page with the Filters grid

This example illustrates the fields and controls on the Example of a Common Attribute page with the Filters grid. You can find definitions for the fields and controls later on this page.

Example of a Common Attribute page with the Filters grid

This feature enables you to preview the values that will be available to a user based on the filter field values defined in the CAF Values - LOV Definition page. To preview the values that are available, enter a field value in the Filters grid and click the Refresh button.

See Defining a Common Attribute, “Defining a List of Values for a Common Attribute.”

Attribute Format

Use this group box to specify the formatting and validation that the framework must perform on the attribute value. Select from the delivered formatting and validation options, or specify your own custom application class.

Field or Control

Definition

Attribute Format

Specify the formatting and validation that the framework must perform on the attribute value:

  • Email Address: Validates if the value entered for the attribute is a valid email address or not. The validation logic used in Campus Community Bio/Demo pages is used here.

  • ISO Country Code: Verifies if the data entered for the attribute is a valid ISO country code.

  • US State Code: Verifies if the data entered for the attribute is a valid US state code.

  • US Zip Code: This is a formatting class. If the attribute value is of 9 digits, it introduces a hyphen between the 5th and 6th character on tab out.

  • Custom Class: Enables you to specify an application class that performs the formatting and validation.

Application Class

Available only when the Attribute Format is Custom Class.

Specify the application class that will format and validate the attribute value.

To write a custom class using PeopleCode, see Writing Custom Logic for Validation and Formatting.

Record Context References

This section lists all the record contexts with which the attribute is associated. Click the link on the Description column to access the Record Context component for the particular record context.

When you define a common attribute, the Record Context References section does not appear on the page. The section appears only after you associate the common attribute to one or more records using the Record Context component.

Access the CAF Values - LOV Definition page (click the Create New CAF Values link or the Open CAF Value Setup link on the Common Attribute page).

Field or Control

Definition

LOV Unique ID

Displays the system-assigned ID for the list of values.

When you create a new list of values, this field displays NOID. When you save the list, the system assigns an ID.

CAF Value Type

Specify whether you want to define the values yourself (Ad Hoc Values), or whether you want the framework to retrieve the values from a table (Table) or a translate field (Translate Values).

The fields on the page change depending on the CAF value type that you select.

Defining Ad Hoc List of Values

If the CAF Value Type is Ad Hoc Values, then you can enter a free-form list of value and description pairs.

Image: CAF Values - LOV Definition page (Ad Hoc list of values)

This example illustrates the fields and controls on the CAF Values - LOV Definition page (Ad Hoc list of values). You can find definitions for the fields and controls later on this page.

CAF (Common Attribute Framework) Values - LOV Definition page (Ad Hoc list of values)

Enter the value-description pairs in the Ad Hoc Values group box.

Use the Copy Ad Hoc Values From group box to copy values from an existing list. To copy values from an existing list: Click the lookup icon in the Copy Ad Hoc Values From group box, select a list, and click the Copy button. If you want to define new values for the list, leave the group box blank.

If the ad hoc list of values, which an attribute on a page displays, should be filtered based on a field value in that page, then select the field name in Filter Field. When you select a filter field, the Extension grid becomes available in the Ad Hoc Values scroll area. Use the Extension grid to specify the field value for which a value-description pair becomes available. For example, suppose you have a list of values attribute on a page and the same page has an Institution field. When a user enters PSAUS in the Institution field, you want the attribute to display 02 and 03 as the list of values. And when a user enters PSGBR in the Institution field, you want the attribute to display 01 and 03 as the list of values. The following example shows how to set up this scenario:

Image: Example of filtering an attribute's list of values (1 of 2)

This example illustrates the fields and controls on the Example of filtering an attribute's list of values (1 of 2). You can find definitions for the fields and controls later on this page.

Example of filtering an attribute's list of values (1 of 2)

Image: Example of filtering an attribute's list of values (2 of 2)

This example illustrates the fields and controls on the Example of filtering an attribute's list of values (2 of 2). You can find definitions for the fields and controls later on this page.

Example of filtering an attribute's list of values (2 of 2)

To aid in data entry, you can use the Extension Field Value Defaults grid to quickly add a field value to all the Extension grids in the Ad Hoc Values scroll area. Enter a field value in the Extension Field Value Defaults grid and then click the Add to Extension button to add the field value to all the Extension grids.

Note: Field Value is a free-form field. Therefore, you must be careful to provide the correct value for the Extension grid. The value you enter as the Field Value is case sensitive.

Defining List of Values from a Table

If the CAF Value Type is Table, then specify the record (Prompt Table) and field (Prompt) on which the list of values should be based.

Image: CAF Values - LOV Definition page (list of values retrieved from a table)

This example illustrates the fields and controls on the CAF Values - LOV Definition page (list of values retrieved from a table). You can find definitions for the fields and controls later on this page.

CAF (Common Attribute Framework) Values - LOV Definition page (list of values retrieved from a table)

Use Description Fieldname to indicate the description field for the value's description.

If there are any fields in the prompt table whose value the system should use to filter the list of values, specify these fields in the Prompt Table Filters grid.

If you select a source option of Constant, then you can enter the filter value in the Constant Value field. If you select a source option of Request XML, then the framework will try to automatically figure out the value of the filter field from the page at runtime. For example, suppose you have added an Academic Program list of values attribute on a page, and the same page displays an Institution and Academic Career field. You want the list of values to display academic programs for only the PSUNV institution and for the academic career which the user selects. The above screenshot shows how to set up this scenario.

To exclude any values from being displayed at runtime, specify these values in the Exclude Prompt Field Values grid. Click the Populate Valid Values button to populate the Excluded Values grid with the field’s (Prompt's) values. Click the Remove All Values button to remove all the values from the Excluded Values grid.

Defining Translate List of Values

If the CAF Value Type is Translate Values, then specify the translate field (Prompt) on which the list of values should be based.

Image: CAF Values - LOV Definition page (list of values retrieved from a translate field)

This example illustrates the fields and controls on the CAF Values - LOV Definition page (list of values retrieved from a translate field). You can find definitions for the fields and controls later on this page.

CAF (Common Attribute Framework) Values - LOV Definition page (list of values retrieved from a translate field)

Use the Translate Usage grid to specify if the framework should use the translate long description or short description as the value’s description.