This page describes the data types available in OutSystems Platform, their default values and constraints, and the built-in functions to convert them into another data type.

Basic Data Types

Type

Default Value

Example

Comment

Binary Data

Byte array with no elements

n/a

 

Boolean

false

true or false

 

Currency

0.0

545870.025

See Decimal type.

Date

#1900-01-01#

#1988-08-28#

Minimum value: #1900-01-01#

Maximum value: #3000-12-31#

Some dates cannot be represented in the Java stack. For example, dates that were forwarded due to daylight saving changes.

Time

#00:00:00#

#12:20:56#

Minimum value: #00:00:00#

Maximum value: #23:59:59#

Date Time

#1900-01-01 00:00:00#

#1988-08-28 23:59:59#

Minimum value: #1900-01-01 00:00:00#

Maximum value: #3000-12-31 23:59:59#

Some dates cannot be represented in the Java stack. For example, dates that were forwarded due to daylight saving changes.

Integer

0

2147483600

Minimum value: -2^31, which is -2147483648.

Maximum value: 2^31-1, which is 2147483647.

Long Integer

0

5645245584135987412

Minimum value: -2^63

Maximum value: 2^63-1

Decimal

0.0

-158121.025

4000.0

Integer and decimal parts must be separated by a period.

Minimum value: -2^96

Maximum value: 2^96-1

 

The maximum number of digits in the decimal part is 8. At runtime, the number of decimal digits depends on the stack of the application server. Consider the restrictions of the System.Decimal in .NET, and those of the java.math.BigDecimal in Java.

Email

"" (empty string)

"fran.wilson@company.com"

 

Phone Number

"" (empty string)

"+1 555 565 3730"

 

Text

"" (empty string)

"My name is Christina Sharp."

 

<Entity> Identifier

When an Entity is created, the <Entity> Identifier data type is created for the its identifier attribute.

Learn more about Entity Identifier.

 

 

Compound Data Types

Type

Comments

<Entity> or <Structure>

When an Entity or Structure is created, a data type is also created with all attributes of that Entity or Structure.

For example, when the Customer entity is created, the Customer data type is created. To create a variable of this data type, simply set its 'Data Type' property to 'Customer'. To access an attribute of the variable, use the following syntax:

 

<variable>.<attribute>, e.g. MyCustomerVar.Name

Object

OutSystems Platform supports the Object data type to allow to reuse your own Java or .NET classes.

The default value is NullObject().

Record

A Record is a data type composed by a fixed number of attributes, each one with its own data type.

Learn more about the Record data type.

Collection Data Types

Type

Comments

List

A List is a sequence of elements of the same data type, either basic or compound. Elements can be inserted, fetched, and removed from a list.

Learn more about the List data type.

Default and Null Values

OutSystems Platform does not use the concept of the NULL value, except for the Entity Identifier data type. Therefore, to each data type there is a default value associated that is assigned at creation.

Data Type Conversions

OutSystems Platform enables the conversion between different data types. This can be made implicitly, or explicitly by using data type conversion functions.

Implicit Conversion

OutSystems Platform automatically converts values of the following types:

Expected Type

Accepted Types

Obs.

Boolean

-

 

Currency

Decimal, Integer, Boolean, Entity Identifier(Integer)

 

Date

Date Time

 

Date Time

Date, Text, Time

 

Integer

Decimal, Boolean, Currency, Entity Identifier(Integer)

When converting Decimal to Integer implicitly, the decimals are truncated.

Long Integer

Long Integer, Integer, Decimal, Boolean, Currency, Entity Identifier(Integer), Entity Identifier(Long Integer)

 

Decimal

Integer, Boolean, Currency, Entity Identifier(Integer)

 

Entity Identifier

Entity Identifier

A certain Entity Identifier can be converted into another Entity's Identifier, but a warning is displayed.

Email

Text, Phone Number, Integer, Decimal, Boolean, Currency, Entity Identifier(Integer), Entity Identifier(Text), Date Time, Date, Time

 

Phone Number

Text, Email, Integer, Decimal, Boolean, Currency, Entity Identifier(Integer), Entity Identifier(Text), Date Time, Date, Time

 

Text

Integer, Decimal, Boolean, Currency, Phone Number, Email, Entity Identifier(Integer), Entity Identifier(Text)

 

Time

Date Time

 

Explicit Conversion Functions

To convert values from one data type to another use data type conversion functions.

Here is a summary about the possible explicit conversions:

From

To

Function

Boolean

Integer

Text

BooleanToInteger

BooleanToText

Date

Date Time

Text

DateToDateTime

DateToText

Date Time

Date

Text

Time

DateTimeToDate

DateTimeToText

DateTimeToTime

Integer

Boolean

Decimal

Text

Integer Identifier

IntegerToBoolean

IntegerToDecimal

IntegerToText

IntegerToIdentifier

Long Integer

Long Integer Identifier

Integer

Text

LongIntegerToIdentifier

LongIntegerToInteger

LongIntegerToText

Decimal

Boolean

Integer

Text

DecimalToBoolean

DecimalToInteger

DecimalToText

Entity Identifier (Integer)

Integer

IdentifierToInteger

Entity Identifier (Long Integer)

Long Integer

IdentifierToLongInteger

Entity Identifier (Text)

Text

IdentifierToText

Text

Date

Date Time

Decimal

Integer

Time

Text Identifier

TextToDate

TextToDateTime

TextToDecimal

TextToInteger

TextToTime

TextToIdentifier

Time

Text

TimeToText

Any data type

Object

ToObject

See Also

List Data Type | Record Data Type | Data Types at Runtime