Skip to main content

Reference

 

OutSystems

Available Data Types

This page describes the data types available in OutSystems, 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#

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#

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.

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 identifier attribute.

 

 

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 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 of a fixed number of attributes, each one with its own data type.

Use a Record to define a compound data type that is used for a single variable. If you need to define more than one variable with the same compound data type, use a Structure instead.

Some use cases for using the Record data type are when:

  • You need to return the result of an Aggregate on a User Action. In this case, you can define the user action output parameter using the record data type;

  • You need a user action that returns compound information, but don't want to define a new Structure.

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 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 enables the conversion between different data types. This can be made implicitly, or explicitly by using data type conversion functions.

Implicit Conversion

OutSystems 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

  • Was this article helpful?