QPR Knowledge Base 2019.1

Unit Properties Window

Unit Properties Window

Previous topic Next topic  

Unit Properties Window

Previous topic Next topic  

dlg_add_unit

You can define the unit for an element to be, for example, dollars, hours, number of cases, percentages, or dates. This is the unit used in the data you are going to input for this element. In the Measurement Unit dialog you can specify the display of the units. Preview of the unit is shown in the Display format panel.

 

Adding or modifying a unit is done from the same window in which you can set all of the properties of a unit. To add or modify a unit, do the following:

 

1.Open the Measurement Units window by clicking the btn_measurement_units Measurement Units button on the Model tab of the ribbon.
dlg_measurement_units
2.To create a new unit, click Add... next to the unit list. To edit an existing unit, select the desired unit from the list and click Edit... The Unit Properties window opens with Unit Name page displayed.
dlg_add_unit
3.You can enter/edit the unit's name in the Unit name field (e.g. "Euros"). In the Unit symbol field, enter/edit the symbol that is used for describing the value (e.g. "€"). The length of this unit symbol cannot exceed 30 characters. You can also enter a brief description of the unit in the Unit description field.
4.Next, select the Display Settings tab. In this tab you can define how the value and the unit are displayed. You can preview the different settings in the "Display format" field located at the top of the window.
dlg_add_unit_display_settings
The following settings are available in this tab:
 
In the Unit type group, you can select whether the unit is a Number or a Date.

 

 

If the Unit type is Number:
 
In the Unit display group, you can select whether the measurement unit is displayed Before or After the value.
You can define how the element's values are displayed in the Value display settings. The following options are available:
In the Digits after decimal field you can define how many digits are displayed after a decimal. The options are 0-6 digits. Note, that the value will be rounded, not truncated.
In the Decimal symbol field you can define the symbol for a decimal. You can either select a symbol from the drop-down list , (comma) .  (dot) or < space>  (single space) or enter any other character, such as ' (apostrophe).
In the Digit grouping field you can define how many digits appear per group. The options are: 2, 3  or 4 digits.
In the Digit grouping symbol field you can define the symbol that separates groups of digits. You can either select a symbol from the drop-down list , (comma) .  (dot) or < space>  (single space) or enter any other character, such as ' (apostrophe).
In the Negative values group you can define how negative values are displayed. You can choose from the following "Negative value format" options: -123, (123) and 123-.

 

If the Unit type is Date:
 
In the Date format field, you can select the date format to be used. You can either select one of the predefined formats from the drop-down menu, or you can define your own format by typing in the specifiers. The list of available specifiers is as follows:

Specifier

Output

c

Displays the date and time. The time is not displayed if the date-time value is midnight precisely. The format of the output depends on the system locale settings.

d

Displays the day as a number without a leading zero (1-31).

dd

Displays the day as a number with a leading zero (01-31).

ddd

Displays the day's name as an abbreviation (Sun-Sat). The format of the output depends on the system locale settings.

dddd

Displays the day as a full name (Sunday-Saturday). The format of the output depends on the system locale settings.

ddddd

Displays the date in short format. The format of the output depends on the system locale settings.

dddddd

Displays the date in long format. The format of the output depends on the system locale settings.

m

Displays the month as a number without a leading zero (1-12). If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mm

Displays the month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mmm

Displays the month as an abbreviation (Jan-Dec). The format of the output depends on the system locale settings.

mmmm

Displays the month as a full name (January-December). The format of the output depends on the system locale settings.

yy

Displays the year as a two-digit number (00-99).

yyyy

Displays the year as a four-digit number (0000-9999).

h

Displays the hour without a leading zero (0-23).

hh

Displays the hour with a leading zero (00-23).

n

Displays the minute without a leading zero (0-59).

nn

Displays the minute with a leading zero (00-59).

s

Displays the second without a leading zero (0-59).

ss

Displays the second with a leading zero (00-59).

z

Displays the millisecond without a leading zero (0-999).

zzz

Displays the millisecond with a leading zero (000-999).

t

Displays the time in short format. The format of the output depends on the system locale settings.

tt

Displays the time in long format. The format of the output depends on the system locale settings.

/

Displays the date separator character. The format of the output depends on the system locale settings.

:

Displays the time separator character. The format of the output depends on the system locale settings.

'xx' or "xx"

Characters enclosed in single or double quotes are shown as they are written, and do not affect formatting.

[ ]

Enclosing a specifier between square brackets means displaying its "full" value (counted from the zero point, 31.12.1899). For example, [m] of 15.3.1901 is 14, whereas [y] of 1.1.2009 is 109. This can be used, for example, to count how many days, months, or years have passed between two dates. Only single character specifiers inside the square brackets are accepted.

 

5.Click OK. The new unit is added to the list or the selected unit has now been modified.

 

Note: The Date format defined here controls only how the date is displayed. If the element uses a date type measurement unit, the value input format must still be the same as the system locale date format or the ISO standard date format (yyyy-mm-dd hh:nn:ss). In addition, to input milliseconds you need to separate them with the decimal symbol defined in the system locale settings. For example, the input format could look like this: yyyy-mm-dd hh:nn:ss,zzz (where the comma is the decimal symbol defined in the system locale settings).

 

 

See Also

Measurement Units