Enumerated Fields

From AgileApps Support Wiki
Revision as of 20:01, 8 November 2011 by imported>Aeric (→‎Working with Enumerated Fields)
File:Movie-rating.gif
Graphic stars illustrate movie rating

Enumerated fields provide powerful visual impact in Views, by displaying a graphic image or color-coded label in place of field values. Enumerated fields have an associated numeric value, which can be used to group, sort or filter data in Views and Reports. In Reports, enumerated fields can appear as color-coded labels, only.

These Field Display Types are enumerated:

About Enumerated Fields

Enumerated Fields in Views provide users with visual indicators of a data metrics. In this example, a movie library View is enhanced with the addition of stars to rank the movies by preference. Although the ranking (Picklist Value) is not displayed, it is used to sort the list.

File:Movie-name.gif
Sorted by Movie Name
File:Movie-rating.gif
Sorted by Movie Rating (Stars)
The ranking (with 1-4 stars) is created by adding a series of images and values to eligible Field Display Types:
Because the Picklist Value is stored in the database, it can be used in these areas of the platform:
  • Sort order in Views and Reports
  • Filters in Views and Reports
  • Color coding criteria in Views and Reports
  • Grouping criteria in Reports

Learn more: Using Enumerated Picklists with Other Platform Elements

  • Enumerated fields include these elements:
  • Display Label
    Can be either an alphanumeric string or an image, or both
  • Alphanumeric string, with optional color coding for text and background color
  • Image, optional, selected from the Documents object
  • Not used to group, sort, or filter records
  • Item Value
  • Stored as part of the record
  • Used to group, sort, or filter records
  • A number that can be used to define the display order

Working with Enumerated Fields

Create an Enumerated Global Picklist

  1. Click Designer > Global Resources > Global Picklists
  2. Click the [New Global Picklist] button and enter the following information:
    Name
    The field label that will be displayed
    Type
    Enumerated - Complete the following information:
    • Show First Value as Default - Checkbox
    • Sort List Alphabetically - Checkbox
    • Click the [Save] button to save your changes

Manage Enumerated Values

  1. Optionally, click the [Reorder Picklist Values] button to change the order (applies only when Sort List Alphabetically option is unchecked)

Managing Enumeration Values

Setting Colors and Images for Enumeration Values

When you create text labels in enumerated fields, you can specify the color of the text and/or the background color, as in this example:

Or you can choose to display graphic images:

Use Label for Grouping

File:Picklistgroupbylabel.gif
Fruit and Vegetable are group labels

Use this option to group picklist values by label. The Use Label for Grouping option is useful when a picklist is long, and can be organized into groups.

To Use Label for Grouping:

  1. Create a Picklist (or Global Picklist with Type = Enumerated)
    • Enter the values in the desired order
    • Include the labels inline with the values
    Fruitpicklist.gif
  2. In the Enumerated Values section, select the intended label
    Fruit and Vegetable are the intended group labels
    Click the Use Label for Grouping checkbox
    Picklistuselabel.gif
  3. Repeat for each intended label

Additional Operations

Create a Dependent Picklist

When the possible choices depend on selections made in other fields, use a Dependent Picklist.

Using Enumerated Fields with Other Platform Elements

Because Picklist Values can contain alphanumeric characters, additional functionality becomes available, as listed here:

Sort order
Use the Picklist Value in Views and Reports to define sort order
Grouping
Use the Picklist Value to Group records in Views and Reports
Display in Views
The Display Labels are shown when displaying a record and in Views. Based on the options selected, the image and the text colors will be shown.
Color coding in Views
Criteria can be specified using Display Labels or Picklist Values; The first match is done using the Display Label, followed by the Picklist Value
Searches/Filters in Views
Criteria can be specified using Display Labels or Picklist Values; The first match is done using the Display Label, followed by the Picklist Value
Global Search
Global search will use only the Picklist Values
Display in Reports
The Display Labels are shown (no images or color coding are displayed)
Reports must not use the Group option
REST or JAVA API
The Picklist Values are returned (not the Display Label)
Dependent Picklists
Learn more: Dependent Picklist
Conditional Layouts
Layout rules will use only the Picklist Values

Considerations

  • The Use Label for grouping option is only available for Picklists
  • After the Use Label for grouping option is selected, the Sort List Alphabetically option is reset to NO
  • If the Use Label for grouping option is selected, the enumerated values are not available for dependent field associations
  • After a dependent field association is created, the Use Label for grouping option cannot be enabled for any of the parent or dependent field values
  • A field cannot be deleted if it is a "parent" for a dependent field
  • If the "parent" field of a dependent field is changed, a confirmation message appears, requesting the user to acknowledge that data will be lost if the change is executed
  • Dependent picklist values cannot be reordered
Learn more: Enumerated Field Behavior For REST Web Services