Which Selection Control Should I Use?

Selection controls are UI elements that allow the user to pick one or several values or options. Different selection controls are available, which each support dedicated use cases. This article offers guidance on when to use the following selection controls:

Selecting a Single Value or Option

To enable users to select a single value or option, display either a combo box, an input field, or a select control. A value is usually a single data point, while an option can consist of several data points, such as product attributes.

Combo Box

The combo box allows users to select one value/option from a predefined list. It’s also possible to type in a value or custom value and filter the predefined selection list (if the application allows it).

Combo box with two-column layout and option to enter custom value
Combo box with two-column layout and option to enter custom value

Input Field

The input field allows users to enter and edit text or numeric values in one line. To help the user enter a valid value, you can enable the autocomplete suggestion feature or provide a selection dialog.

The selection dialog opens when the user clicks the input field icon.

Input field
Input field
Input field with a button to open one of the selection dialogs
Input field with a button to open one of the selection dialogs

Select

The select control (also known as a dropdown) is commonly used to select a value/option from a predefined list.

Select control
Select control

Selecting Multiple Values or Options

The multi-combo box and multi-input field support the selection of multiple single values or options. A value is usually a single data point, while an option can consist of several data points, such as product attributes.

Multi-Combo Box

Use the multi-combo box if users need to select multiple values/options from a predefined list. The values/options in the list have checkboxes that support multi-selection. Users can also type in a value to filter the list (if the application allows it).

Multi-combo box with three selected values
Multi-combo box with three selected values
Focused, opened multi-combo box
Focused, opened multi-combo box

Multi-Input Field

A multi-input field allows users to enter more than one value/option which are are displayed as tokens. You can enable the suggestions feature or provide a selection dialog to help users enter a valid value/option.

Multi-input field with three values
Multi-input field with three values
Multi-input field with three values while typing
Multi-input field with three values while typing
Multi-input field with values and the option to open a selection dialog
Multi-input field with values and the option to open a selection dialog

Supporting Selection Dialogs

There are three selection dialogs: the select dialog, the table select dialog, and the value help dialog. These dialogs enable users to pick one or several values or options from a long list. Selection dialogs are useful when users need more than one data point to identify the “right” value/option, or when they want to search the list to find a particular value/option.

The selection dialogs are always used in combination with one of the following controls:

  • Input field for selecting one value/option
  • Multi-input field for selecting more than one value/option

Users can open the respective selection dialog from within these controls.

Example

The user wants to pick a certain product. However, because the product names are very similar, it’s difficult to identify the right one. Additional product attributes in the selection dialog, such as an image and the product release date, help the user to pick the correct option.

Select Dialog

The select dialog enables users to select one or more values/options from a comprehensive list. The select dialog comes with a list of entries containing a few attributes. It also provides a search field to filter the list.

Select dialog with two selected items
Select dialog with two selected items

Table Select Dialog

The table select dialog enables users to select one or more values/options from a comprehensive table. Usually, the table displays multiple attributes or other related information for an item. Making this additional information available for an entry helps users identify the correct value/option.

The table select dialog reuses the responsive table. It also provides a search field to filter the list.

Table select dialog with two selected items
Table select dialog with two selected items

Value Help Dialog

The value help dialog enables users to find and select single and multiple values/options. It also allows users to define conditions and multiple ranges.

Value help dialog on a mobile device
Value help dialog on a mobile device

Best Practices

Depending on the number of entries in the selection list, users might need more information to identify the “right” single value/option or multiple values/options.

Use the criteria in the tables below to choose the most suitable selection control according to the number of data points you have for each value/option and the number of entries you have in the selection list.


Selecting a Single Value or Option

The user can identify the “right” value/option based on… 2-12 entries in the selection list 13-200 entries in the selection list
200-1,000 entries in the selection list
More than 1,000 entries in the selection list
…a single data point Select or combo box Combo box
with validator that prohibits custom values
Input field with suggestions and select dialog Input field with suggestions and value help dialog
two data points Select or combo box
with two-column layout
Combo box
with validator that prohibits custom values
Input field with suggestions and select dialog Input field with suggestions and value help dialog
...3 or 4 data points with/without an image Input field with suggestions and select dialog Input field with suggestions and select dialog Input field with suggestions and select dialog Input field with suggestions and value help dialog
more than 4 data points with/without an image Input field with suggestions and table select dialog Input field with suggestions and table select dialog Input field with suggestions and table select dialog Input field with suggestions and value help dialog
several data points and option to narrow selection list down (by defining conditions, selecting ranges) Input field with suggestions and value help dialog Input field with suggestions and value help dialog Input field with suggestions and value help dialog Input field with suggestions and value help dialog

Selecting Multiple Values or Options

The user can identify an individual value/option based on… 2-12 entries in the selection list 13-200 entries in the selection list
200- 1,000 entries in the selection list
More than 1,000 entries in the selection list
…a single data point Multi-combo box Multi-combo box Multi-input field with suggestions and select dialog Multi-input field with suggestions and value help dialog
two data points Multi-combo box
with two-column layout
Multi-combo box
with two-column layout
Multi-input field with suggestions and select dialog Multi-input field with suggestions and value help dialog
3 or 4 data points with/without an image Multi-input field with suggestions and select dialog Multi-input field with suggestions and select dialog Multi-input field with suggestions and select dialog Multi-input field with suggestions and value help dialog
more than 4 data points with/without an image Multi-input field with suggestions and table select dialog Multi-input field with suggestions and table select dialog Multi-input field with suggestions and table select dialog Multi-input field with suggestions and value help dialog
several data points and option to narrow selection list down (by defining conditions, selecting ranges) Multi-input field with suggestions and value help dialog Multi-input field with suggestions and value help dialog Multi-input field with suggestions and value help dialog Multi-input field with suggestions and value help dialog

Resources

Want to dive deeper? Follow the links below to find out more about related controls, the SAPUI5 implementation, and the visual design.

Elements and Controls

Implementation

T Account

In double-entry bookkeeping, journal entries are transferred to the general ledger by posting their debit and credit amounts on specific ledger accounts, which are often referred to as T accounts. A ledger account (or T account) is usually displayed in a format that resembles the letter T: with the account name above the T, debit entries to the left of the T, and credit entries to the right of the T.

T accounts are usually clustered together, so the accountants can analyze how individual line items from different journal entries affect the ledger balances.

Example of a T account
Example of a T account

Usage

Use the T account if:

  • You need to analyze how individual line items affect one or several ledger accounts.
  • You want to highlight the cross-account impact of one journal entry.
  • You want to aggregate data of individual ledger accounts and provide total balances.

Do not use the T account if:

  • You need to aggregate data through a different dimension than the account balance. Use a table instead.
  • You need to display objects that are not journal entry line items.

Responsiveness

The T account control is fully responsive, and uses 100% of the available width of the container in which it is embedded. Depending on the available width, the number of T accounts on each line is updated dynamically to fit the available space.

On mobile devices, the T account control requires the full available width in order to display all its content.

The minimum width of each T account element is 20 rem (320 px). The width of the T account element grows until it reaches a breakpoint where enough width is available to render 2 or more T accounts on one line, leaving a space of 1 rem (16 px) between the T account items.

Size S
Size S
Size M
Size M
Size L
Size L

Layout

The T account control consists of a header toolbar, an account group heading, and individual T account elements. The header toolbar and account group heading can be hidden on the API level.

Schematic visualization of a T account
Schematic visualization of a T account

Components

By default, the T account control consists of a header toolbar, account group heading, and T accounts.

Header Toolbar

  • A – Title: Provides a short and meaningful summary of the control’s content.
  • B – Total Balance: Calculates the overall balance based on total credit and debit amounts of the ledger accounts included.
  • C – View Switch: Switches the view between the T account view and table view.
  • D – Settings: Displays a settings dialog, allowing users to show or hide additional information about accounts.

Account Group Heading

Each account group heading uses the expand/collapse behavior of the sap.m.Panel control, with an additional total balance indicator for the T accounts in the group as well as Expand All / Collapse All buttons. The Expand All / Collapse All buttons can be used to expand or collapse the content of all T accounts included in this account group.

  • A – Expand/Collapse: Expands or collapses the group of accounts.
  • B – Account Group Title: The name of the group of accounts.
  • C – Group Balance: Calculates the balance based on total credit and debit entries of all T accounts included in the account group.
  • D – Expand All: Expands all T accounts within the group of accounts.
  • E – Collapse All: Collapses all T accounts within the group of accounts.

T Account

Every T account element consists of a heading, debit and credit content headings, and individual ledger entry blocks.

The number of individual entry blocks is unlimited and could potentially reach hundreds of blocks.

The entry blocks are nested under Credit and Debit headings. Each entry block takes 50% of the available width of the container. The credit and debit entry blocks are separated by a 1 rem (16 px) space.

  • A – Expand/Collapse: Expands or collapses the T account.
  • B – Account Title: The name of the T account.
  • C – Account Balance: The sum of all credit and debit entries in the T account.
  • D – Debit Content Heading
  • E – Credit Content Heading
  • F – Entry Block Amount: Provides the amount for a single ledger entry.
  • G – Entry Block: Displays details of a specific ledger entry.
Header toolbar
Header toolbar
Account group heading
Account group heading
T account
T account

Behavior and Interaction

Matching Entries

Each journal entry usually impacts several ledger accounts. When the user clicks an entry in a T account, the control highlights this entry and all related entries in other T accounts, which helps identify matching entries in different accounts.

Highlighting for related entries
Highlighting for related entries

Color Indicators

You can allow users to add color indicators to specific journal entries.

The T account control supports this on API level. However, the implementation should be done on the app level.

Information
To ensure consistency with other controls, sap.m.ColorPalette or sap.ui.unified.ColorPicker controls must be used together with standard SAP Fiori color palettes.
Tagging
Tagging

Drag and Drop

By default, the control arranges T accounts dynamically to consume as little space as possible within the column grid. However, users can rearrange the T accounts freely by dragging them around.

If you would like to let users store their reordered layouts, use the variant management control.

View Settings

The view settings dialog enables the users to show or hide certain attributes of each entry block in a T account.

Additionally, you can show or hide labels that precede the values.

View settings
View settings

Resources

Want to dive deeper? Follow the links below to find out more about related controls, the SAPUI5 implementation, and the visual design.

Elements and Controls

Implementation

Wrapping and Truncating Text

Wrapping and truncation define how text behaves when the length of the text exceeds the available space. The responsive behavior is device-independent and is the same on all form factors. Different controls make use of wrapping and/or truncation. This article provides an overview of best practices.

Types

There are three types of responsive behavior for text that doesn’t fit onto a line:

  • Wrapping
  • Truncation
  • A combination of wrapping and truncation

Wrapping

Excess text moves down to the next line.

Note: If you switch on hyphenation, there is always a minimum of 3 characters at the end of the line before wrapping and at the start of the next line after wrapping.

Text wraps
Text wraps

Truncation

Excess text is cut off and is no longer visible. A truncation indicator appears at the end of the line (…).

Note: The truncation indicator for multiple lines depends on the browser line clamping support. For browsers that support it, this will be shown as ellipsis (…), whereas in other browsers, the overflowing text will just be cut off.

Text truncates
Text truncates

Wrapping and Truncation

Wrapping and truncation are combined. For example, a text might wrap over two lines and then truncate.

Combination: The text wraps over three lines and then truncates
Combination: The text wraps over three lines and then truncates

Usage

Follow the best practices below to decide whether to use truncation, wrapping, or a combination of both for your use case.

Use wrapping if:

  • The information is crucial for the user.
  • The user is required to read the full text (for example, in consent forms).
  • You are uncertain about how important the text is for the user.
  • You want to display numbers in a piece of continuous text. In this case, use the text control to avoid truncated numbers.
  • You are using the title control outside of toolbars, the launchpad shell bar, and the dialog header.
  • The text for a list item is crucial for the user. In this case, use the custom list item in combination with the text control.
  • You are using a label, object status, or link. For these controls, use a short, precise text.

Use truncation if:

  • The text contains only secondary information. In this case, provide the user with a quick way to see the full text with one interaction, such as one click. An example might be a text link that opens a popover with the full text and additional information.
  • The control is designed to save vertical space, and only allows one line of text with a limited width (for example, the title of a toolbar).
  • You use complex tables, such as the grid table, analytical table, or tree table to avoid performance issues.
  • You use the standard list item, object list item, input list item, display list item, or action list item. Provide the truncated information in the header of the linked page. If the item has no navigation target, provide the user with another way of displaying the truncated information. One option might be to provide a text link that opens a popover with the full text and additional information, for example. Do not use a tooltip to show the full text.
    SAP S/4HANA Only:
    You can opt to offer tooltips for the column headers of tables. This allows users to read the full column header text without resizing.

Use a combination of wrapping and truncation if:

  • The text is a teaser or serves as an appetizer for a longer text, such as an article. In this case, use the text control with the property MaxLines.
  • The control is designed to save vertical space, and only allows a limited number of lines, with a limited width (for example, tiles with 2 lines for the title).

Do not use wrapping, truncation, or the combination of both techniques if:

  • You want to show a standalone numeric value, such as 1,000.00 EUR. Use the object number with a formatter and a short or medium format instead.
  • The text is inside another UI element that is not intended to wrap (such as a button).

Resources

Want to dive deeper? Follow the links below to find out more about related controls, the SAPUI5 implementation, and the visual design.

Elements and Controls

Implementation

No links

How To Use Semantic Colors / Industry-Specific Colors

You can use semantic colors and industry-specific colors to visualize the status or state of business data:

  • Semantic colors denote standard value states (such as positive, critical, or negative). Each state has the same basic meaning in all contexts.
  • Industry-specific colors reflect the color conventions in a line of business or industry. The meaning of each color depends on the business context.
    In SAPUI5, industry-specific colors are called indication colors.

Nearly all input controls support semantic colors for value states, while industry-specific colors are only supported by a few UI elements.

For information about the color values for other themes, see Belize Colors and Quartz Light Colors.

Object status with semantic colors for value states
Object status with semantic colors for value states
Object status with industry colors
Object status with industry colors

When to Use

Do
Don't

Use semantic colors for value states if:

Don’t use semantic colors if:

  • The color has no meaning and is used only for decoration.
  • You want to use colors in an industry-specific context, where the meaning of the colors differs from the standard semantic meaning. Use the industry-specific colors instead.

Use industry-specific colors if:

  • You want to use a color based on industry conventions (for example, when the meaning of a color is defined in an industry standard).

Don’t use industry-specific colors if:

  • The color has no meaning and is used only for decoration.
  • No special industry color conventions apply. Use the standard semantic colors for value states instead.

Overview

Semantic Colors for Value States

SAP Fiori has five semantic colors that are associated with the following predefined value states:

Semantic colors for value states in a checkbox
Semantic colors for value states in a checkbox

Industry-Specific Colors

SAP Fiori has 10 generic indication colors that are intended only for industry-specific use cases. You can associate these colors with a specific meaning in a given industry context (for example, to reflect industry standards).

Each application must clearly communicate the meaning of each color. In addition to using a color, you must also provide a text, such as an object status. All colors require a corresponding descriptive text for accessibility purposes.

The indication color palette is supported exclusively by tables and the object status.

Object status with five industry-specific colors
Object status with five industry-specific colors
Object status with three industry-specific colors
Object status with three industry-specific colors

Using Semantic Colors for Value States

Only use a semantic color if you need to convey the meaning defined for the respective value state. This section looks at each value state in turn, and offers guidance on when to use each one.

None

This is the default state of an element. It means that no semantic or industry-specific meaning is assigned to it.

Use the “None” state if:

  • You want to use the default of a UI element.
  • There is no reason to use another value state.
  • You want to indicate a neutral object status.
  • message contains non-critical, additional information for users.
Radio button, step input, and input in the 'None' state
Radio button, step input, and input in the 'None' state

Positive

This state stands for a good, positive situation, or for the successful completion of a task.

Use the “Positive” state if:

  • You want to highlight a good or positive status.
  • message contains information about a process that was finalized without any issues. Users need this information later on (for example, to copy values to another app).

To indicate a successfully completed process, a short notification is enough. In this case, use a message toast and not the semantic color for the positive value state.

Radio button, step input, and input in a 'Positive' state
Radio button, step input, and input in a 'Positive' state

Critical

This state indicates a critical situation or warning.

Use the “Critical” state if:

  • You want to highlight a critical status.
  • A minor problem has occurred. The user can carry on working, but might run into an error later on.
  • The current mode or page can be finalized, but doing so might lead to an error later on.
  • The user input was validated and a minor problem occurred. The user can continue without fixing the problem, but might run into an error later on.
  • A message contains information about a warning.
Radio button, step input, and input in a 'Critical' state
Radio button, step input, and input in a 'Critical' state

Negative

Use this state for errors, or to indicate a bad or negative status or consequence.

Use the “Negative” state if:

  • Something bad has happened, or is about to happen. The issue requires the user’s attention. Until the issue is resolved, the user can’t carry on working.
  • You want to indicate that a value has caused an error.
  • The user needs to be prevented from finalizing the current mode or page.
  • The user input failed a validation, and the problem must be fixed before the user can continue.
  • message contains information about an error.
Radio button, step input, and input in a 'Negative' state
Radio button, step input, and input in a 'Negative' state

Information

Use this state to highlight a piece of information.

Use the “Information” state if:

  • You want to draw attention to a control for an important purpose, such as visualizing the recommendations from intelligent systems in input fields.
  • You want to highlight newly added items, such as a new table row.

Don’t apply the semantic color for the information state to text. The blue text color is explicitly reserved for links. If you need to emphasize text, use bold or italic formatting instead.

Radio button, step input, and input in an 'Information' state
Radio button, step input, and input in an 'Information' state

Using Industry-Specific Colors

There is no predefined meaning for the individual colors in the generic palette. If you want to use one or several colors from the industry-specific color palette in your application, proceed as follows:

  • Define the meaning for each color you want to use.
  • Whenever you use an color, provide an additional text indicator (such as an object status) to ensure that the text is clear and accessible.
  • Once you have defined the meaning for a color, use the color/meaning consistently within your application.

Color Overlap

By default, some colors are the same in the semantic palette and the industry-specific color palette (such as red, orange, green, and blue). This is intended. However, the two color palettes can be themed independently, which means that end users might not see the same colors in both.

No Palette Mix

Some UI elements support both the semantic color palette and the industry-specific color palette. However, you can only use one color palette at a time. It is not possible to mix different colors from both palettes.

Color Hierarchy

If an UI element would have multiple semantic or industry-specific color statuses at the same time, the control may need to determine an “overall color” at first.
In this case, the overall color is based on the color hierarchy: colors higher up in the hierarchy take precedence over those lower down. Note that there is only one hierarchy for both semantic colors and industry-specific colors.

Color hierarchy
Color hierarchy

Styles

The semantic colors and industry-specific colors are themeable.

Resources

Want to dive deeper? Follow the links below to find out more about related controls, the SAPUI5 implementation, and the visual design.

Elements and Controls

Implementation