Updated: November 11, 2016

Object Number

sap.m.ObjectNumber

Intro

The object number is a short text that represents the numeric (key) attribute of an object and its unit. The number has a semantic color, and the unit inherits the same color from its number. The number can be displayed in emphasized format (default) when used for the key attribute, and non-emphasized when used for any other numeric attribute of the item.

The object number is mostly used to indicate the key attribute of an object in the object header and in the table as an attribute of a line item.

Usage

Use the object number if:

  • You want to display the key attribute of an object. (In this case, keep the emphasized  default setting (property: emphasized).)
  • You need to display one or more numeric attributes of an object that, for example, you want to compare (property: emphasized set to false).

Do not use the object number if:

  • You want to use it for decoration.
  • You want to display system messages.

Responsiveness

The object number does not wrap or truncate. For large numbers, you need to consider using the appropriate formatting.

Components

The object number consists of the following:

  • A semantically colored text (property: number), which can be set to non-emphasized when used in the content area (property: emphasized)
  • An optional unit (property: unit)
Example
Example

Guidelines

Use the following semantics to indicate the status: negative (property: error), critical (property: warning), positive (property: success), neutral (property: none).

Neutral object number (856.74 euro) used as key attribute in the object header
Neutral object number (856.74 euro) used as key attribute in the object header

If the object number is the key attribute of the object inside the content area, the number should be shown emphasized when used as line item status in a table.

Object number with key attribute
Object number with key attribute

The object number can also be used to visualize other semantic numeric attributes. In that case they are not emphasized, unless they are the key attribute (e.g. a sum).

Object number used as attribute (weight) and as as key attribute (price)
Object number used as attribute (weight) and as as key attribute (price)

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

No link

Implementation