Difference between revisions of "Enumerated Fields"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 63: Line 63:


{{Note|Reordering can be done only when the ''Sort List Alphabetically'' option is unchecked.}}
{{Note|Reordering can be done only when the ''Sort List Alphabetically'' option is unchecked.}}
===Specify a Default Value===
To specify a default value for an enumerated field:
# Click '''[Edit]'''
# Type in a value or select functions to create a formula expression that returns the default value.
;Considerations:
:*


===Setting Colors and Images for Enumeration Values===
===Setting Colors and Images for Enumeration Values===

Revision as of 00:56, 9 November 2011

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
  3. Click [Save].

Add a Value

In the Enumerated Values section: Add an Enumerated Value

  1. Click [Save] to save the value, or [Save & New] to save it and add another value.

Reorder Values

To change the order in which picklist values are displayed:

  1. Click [Reorder Picklist Values] button.
    A list of entries appears.
  2. Select an entry and use the Up-Down Arrows to change its position in the list.
  3. Click [Save]

Notepad.png

Note: Reordering can be done only when the Sort List Alphabetically option is unchecked.

Specify a Default Value

To specify a default value for an enumerated field:

  1. Click [Edit]
  2. Type in a value or select functions to create a formula expression that returns the default value.
Considerations

Setting Colors and Images for Enumeration Values

When you create an enumerated field, you can choose to leave the entries unspecified, or specify a series of text values. Here, for example, text values are specified when creating a new Picklist for possible sources of an Order:

EnumeratedPicklist-new.png

Once created, you can use the [Manage Values] button to work with the entries in the list:

Clicking that button opens a grid section dialog that lets you specify display labels, item values, text colors, images, and more:

Your choices are then reflected in the "Label as displayed" column of the Enumerated Values table:

Alternatively, you could choose graphic images you uploaded to the platform as Documents, like those shown here:

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.

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

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