Percentage Fields

Using Application Composer, you can extend an application's object model by adding fields to both standard or custom objects.

One such field type is a percentage field, where users in the runtime application can enter a percentage. Application Composer automatically adds the percent sign to the number.

Percentage Field Properties

Create a percentage field by specifying values for the common set of field properties, such as display label and field name. You also set properties for this field that are specific to the percentage field type.

The following properties are common across multiple field types:

Field Property

Field Property Region

Label

Appearance

Help Text

Appearance

Display Width

Appearance

Note: Do not use. A field's display width is dynamically calculated based on the field type and resolution.

Name

Name

Description

Name

Required

Constraints

Updatable

Constraints

Searchable

Constraints

Indexed

Constraints

Fixed Value

Default Value

Expression

Default Value

The following properties are unique to only certain field types, including percentage fields:

Field Property

Field Property Region

Decimal Places

The number of digits that can be entered and displayed to the right of the decimal point. If at runtime, a user enters more digits after the decimal point, then Application Composer rounds up (using the tie-breaking rule, round half up) to derive the field's value.

For example, if you enter 2 for the number of decimal places, then at runtime, an entry of 4.986 is displayed as 4.99.

Constraints

Maximum Length

The maximum digits a user can enter in the field.

Maximum Length - Decimal Places = the number of digits that can appear to the left of the decimal point.

Don't set a maximum length shorter than the number of decimal places.

Constraints

Additional Percentage Field Specifications

Additional specifications for this field type include the following details:

  • Data type is NUMBER.

  • A object can have a total of 625 fields. Of these, 200 are reserved for number, currency, and percentage fields.

  • Application Composer automatically adds the percent sign.

  • For custom fields, the percentage value is stored as the absolute value. For example, 100%=1 and 60%=0.6. Application Composer multiplies it by 100 and displays the converted percentage value.