Data Type Conversion Rules

Designer Administrator
This manual is in pilot operation.

In text expressions, various operations such as string concatenation and arithmetic operations on numbers can be performed. Depending on the type of operation, if the data types of the operands do not match, data type conversion will occur. Whether or not to perform a type conversion varies by operation, but if performed, it always follows the rules below.

Conversion to String

When a number is converted to a string, it follows these rules:

  • Even if the integer part is zero, it is not omitted (0 is displayed).

  • The decimal part is always shown with 4 digits.

  • If the number is negative, '-' is prefixed. There is no '+' prefix for positive numbers.

When a Boolean value is converted to a string, "True" becomes "1" and "False" becomes "0".

When an object is converted to a string, it is transformed as follows:

Type of Object Resulting String from Type Conversion

Dimension Group

"DIMENSIONS"

Dimension

Dimension label string (all uppercase)

Member

Member label string (all uppercase)

Property Value

Property value label string (all uppercase)

Ledger Group

"LEDGERS"

Ledger

Ledger label string (all uppercase)

Cell Range

String displaying the aggregate value of the cell range with 4 decimal places

Conversion to Boolean

When a string is converted to a Boolean value, "0" and empty strings are considered "False" (spaces around "0" are allowed). All other strings are considered "True".

When a number is converted to a Boolean value, zero is "False". All other numbers are "True".

When a cell range object is converted to a Boolean value, it is based on the aggregate value of the cell range following the above rules.

Objects other than cell ranges are first converted to strings, and then, following the string to Boolean conversion rules, they are converted to Boolean values.

Conversion to Numeric

When a Boolean value is converted to a number, "True" becomes 1 and "False" becomes 0.

Strings cannot be converted to numbers. Attempting to use a string in numeric operations results in an error (displayed as #VALUE!).

When a cell range object is converted to a number, the result is the aggregate value of the cell range.

When a field object is converted to a number, the result is the same as if the field value (string value) was converted to a number using the @Numeric function.

Objects other than cell ranges and fields cannot be converted to numbers. Using these objects in numeric operations results in an error (displayed as #VALUE!).