Value formatting refers to applying a special formatter to the value of a property, transforming the raw value to a more readable version. In the image below, the left-hand side (Before) shows the weight and value columns without any formatting. The right-hand side (After) has a unit (“kg”) applied to the weight column and the value column is displayed in a more compact form with a currency sign (“$100K”). These are both examples of numeric formatting. The Ontology also supports date and time formatting, as well as user ID formatting and resource RID formatting.

Value formatting example

Supported value formatting

TypeDescription
Numeric formattingAdd currencies/units/prefixes, various types of notations (compact, scientific), and percentages. See the numeric formatting section for more details.
Date and time formattingRender timestamps and dates in a specific format as well as in a specific timezone.
Foundry ID formattingDisplay a Foundry ID as a user's first and last name or group name.
Resource RID formattingDisplay a Foundry resource ID (RID) as an icon and resource name, with a clickable link that routes to that resource.

Add value formatting

In the property editor:

  1. Select the property to which you want to add value formatting.
  2. On the right hand side panel of the properties pane, you will see a type of formatting depending on the base type of the property (value formatting, numeric formatting, date and time formatting, etc.). Toggle on the formatting.
Value formatting toggle
  1. Additional formatting options are available for numeric formatting and date and time formatting, as described below:
  2. As you select the available formatting options, you will see a preview for how values of the property will be rendered with the new formatting applied.

Numeric formatting options

Numeric formatting options
NameDescriptionUsage
Numeric formattingOn/Off toggle.Toggle this to remove/add numeric formatting.
Base typeContains various types of formatting available (Currency, Unit, Percentage, Prefix/Suffix, Fixed Values) as well as examples and descriptions of each type.If Capacity in Pounds has an associated unit, select "Unit" from this dropdown.
Use groupingAdds locale-aware comma separator.Toggle this on to go from 123456 to 123,456.
NotationContains Compact/Scientific and Engineer notations.Choose compact to approximate values, like 123K.
Preview resultView and test numeric formatting.Add any number in the input that is similar to what you'd expect to see in your property's values for a preview of the formatting.

Date and time formatting options

Date and time formatting options
NameDescriptionExample
DateOnly the date (no time)Wed, Jul 22, 2020
Date and time (long)Both the date and time, in long formWed, July 22, 2020, 1:00:00 PM
Date and time (short)Both the date and time, in short formJul 22, 2020, 1:00 PM
ISO instantBoth the date and time (ISO 8601 format)2020-07-22T13:00:00.000Z
Relative to nowThe date relative to right now8 minutes ago
TimeOnly the time (no date)1:00 pm

When formatting Relative to now, applications will only format in relative terms up to 24 hours ago. After this, it will render in Date and time (short) form with the day of the week: Wed, Jul 22, 2020, 1:00 PM.

Relative to now

Time zones

If you are formatting a timestamp, you can specify which timezone to render the timestamp, either as a static timezone that you input, or as the application user's current timezone. When entering a static timezone, you can search for a timezone by inputting the UTC offset or the locale name.

User ID formatting

Value formatting can be applied to strings that are Foundry/Multipass user IDs or group IDs and convert them to display the user's first and last name or the group name by selecting the Multipass username option. This value formatting option is typically used when you have created an Action that edits a property and stores a user ID or group ID in one of the property fields. In the backing data, this information will be stored as the user's Foundry user ID or group ID, and the value formatting can be applied to render the user's name or the group instead of the ID.

FAQ

Will this work with existing type classes?

Value formatting takes precedence over existing type classes in the UI. If you have both configured, value formatting will be displayed. You can however, use value formatting on one property and type classes on another.

Will this work with editable properties in Object Views?

Value formatting is supported for properties configured for inline edits. Properties with the legacy hubble:editable type class will disable value formatting.