In OutSystems Platform you have the logical and boolean operators presented below.

Unary NOT

Performs the logical 'NOT' operation.

Allowed Data Types

NOT

Text

Integer

Long Integer

Decimal

Boolean

Date Time

Date

Time

Email

Phone Number

Currency

Binary Data

No

No

No

No

Yes

No

No

No

No

No

No

No

AND

Performs the logical 'AND'.

Allowed Data Types

AND

Text

Integer

Long Integer

Decimal

Boolean

Date Time

Date

Time

Email

Phone Number

Currency

Binary Data

Text

No

No

No

No

No

No

No

No

No

No

No

No

Integer

No

No

No

No

No

No

No

No

No

No

No

No

Long Integer

No

No

No

No

No

No

No

No

No

No

No

No

Decimal

No

No

No

No

No

No

No

No

No

No

No

No

Boolean

No

No

No

No

Yes

No

No

No

No

No

No

No

Date Time

No

No

No

No

No

No

No

No

No

No

No

No

Date

No

No

No

No

No

No

No

No

No

No

No

No

Time

No

No

No

No

No

No

No

No

No

No

No

No

Email

No

No

No

No

No

No

No

No

No

No

No

No

Phone Number

No

No

No

No

No

No

No

No

No

No

No

No

Currency

No

No

No

No

No

No

No

No

No

No

No

No

Binary Data

No

No

No

No

No

No

No

No

No

No

No

No

OR

Performs the logical 'OR'.

Allowed Data Types

OR

Text

Integer

Long Integer

Decimal

Boolean

Date Time

Date

Time

Email

Phone Number

Currency

Binary Data

Text

No

No

No

No

No

No

No

No

No

No

No

No

Integer

No

No

No

No

No

No

No

No

No

No

No

No

Long Integer

No

No

No

No

No

No

No

No

No

No

No

No

Decimal

No

No

No

No

No

No

No

No

No

No

No

No

Boolean

No

No

No

No

Yes

No

No

No

No

No

No

No

Date Time

No

No

No

No

No

No

No

No

No

No

No

No

Date

No

No

No

No

No

No

No

No

No

No

No

No

Time

No

No

No

No

No

No

No

No

No

No

No

No

Email

No

No

No

No

No

No

No

No

No

No

No

No

Phone Number

No

No

No

No

No

No

No

No

No

No

No

No

Currency

No

No

No

No

No

No

No

No

No

No

No

No

Binary Data

No

No

No

No

No

No

No

No

No

No

No

No

Comparison operators <, >, <=, >=

Common arithmetic operations. When one of the operand is Text, the other operand is convert to Text, and it performs the string comparison operation.

Allowed Data Types

<, >, <=, >=

Text

Integer

Long Integer

Decimal

Boolean

Date Time

Date

Time

Email

Phone Number

Currency

Binary Data

Text

Yes

Yes(a)

Yes(a)

Yes(a)

Yes(a)

Yes(a)

Yes(a)

Yes(a)

Yes(a)

Yes(a)

No

No

Integer

Yes(a)

Yes

Yes

Yes

No

No

No

No

No

No

Yes(c)

No

Long Integer

Yes(a)

Yes

Yes

Yes

No

No

No

No

No

No

Yes(c)

No

Decimal

Yes(a)

Yes

Yes

Yes

No

No

No

No

No

No

Yes(c)

No

Boolean

Yes(a)

No

No

No

No

No

No

No

No

No

No

No

Date Time

Yes(a)

No

No

No

No

Yes

No

No

No

No

No

No

Date

Yes(a)

No

No

No

No

No

Yes

No

No

No

No

No

Time

Yes(a)

No

No

No

No

No

No

Yes

No

No

No

No

Email

Yes(a)

No

No

No

No

No

No

No

Yes

Yes(b)

No

No

Phone Number

Yes(a)

No

No

No

No

No

No

No

Yes(b)

Yes

No

No

Currency

No

Yes

Yes

Yes

No

No

No

No

No

No

Yes

No

Binary Data

No

No

No

No

No

No

No

No

No

No

No

No

(a) The non-text side is converted to Text and the length of both texts are compared.

(b) Both variables are converted to Text and the their length is compared.

(c) The Currency operand is converted to Integer data type and then compared.

Equality operators =, <>

Performs equality operations. When one of the operands is Text, the other operand is convert to Text, and it performs the string comparison operation.

Allowed Data Types

=, <>

Text

Integer

Long Integer

Decimal

Boolean

Date Time

Date

Time

Email

Phone Number

Currency

Binary Data

Entity/Structure/

Record

Integer Identifier

Text Identifier

Text

Yes

Yes(a)

Yes(a)

Yes(a)

Yes(a)

Yes(a)

Yes(a)

Yes(a)

Yes(a)

Yes(a)

Yes(a)

No

No

No

No

Integer

Yes(a)

Yes

Yes

Yes

No

No

No

No

Yes*

Yes*

Yes*

No

No

No

No

Long Integer

Yes(a)

Yes

Yes

Yes

No

No

No

No

Yes*

Yes*

Yes*

No

No

No

No

Decimal

Yes(a)

Yes

Yes

Yes

No

No

No

No

Yes*

Yes*

Yes*

No

No

No

No

Boolean

Yes(a)

No

No

No

Yes

No

No

No

No

No

No

No

No

No

No

Date Time

Yes(a)

No

No

No

No

Yes

Yes*

Yes*

Yes*

Yes*

No

No

No

No

No

Date

Yes(a)

No

No

No

No

Yes*

Yes

No

Yes*

Yes*

No

No

No

No

No

Time

Yes(a)

No

No

No

No

Yes*

No

Yes

Yes*

Yes*

No

No

No

No

No

Email

Yes(a)

Yes*

Yes*

Yes*

No

Yes*

Yes*

Yes*

Yes

Yes*

No

No

No

No

No

Phone Number

Yes(a)

Yes*

Yes*

Yes*

No

Yes*

Yes*

Yes*

Yes*

Yes

Yes*

No

No

No

No

Currency

Yes(a)

Yes*

Yes*

Yes*

No

No

No

No

No

Yes*

Yes

No

No

No

No

Binary Data

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

Entity/Structure/

Record

No

No

No

No

No

No

No

No

No

No

No

No

Yes(b)

No

No

Integer Identifier

No

No

No

No

No

No

No

No

No

No

No

No

No

Yes(c)

No

Text Identifier

No

No

No

No

No

No

No

No

No

No

No

No

No

No

Yes(c)

(a) The non-text side is converted to Text and then compared.

(b) Only possible if both operands are of the same type, then, compare the value of the attributes.

(c) Identifiers of different entities can be compared but a warning is issued.

*Equality between Different Types

Type of Operand 1

Type of Operand 2

Result

Date

Date Time

Converts Date Time operand type to Date type by dropping the time component.

Date Time

Date

Converts Date operand type to Date Time type by adding the time component (#00:00:00#).

Time or Date Time

Time or Date Time

Converts Time operand type to Date Time type by adding the date component (#01-01-1900#).

Currency

Integer, Long Integer, or Decimal

Converts the Currency variable to Integer data type.

Email or Phone Number

Integer, Long Integer, or Decimal

Converts Decimal, Long Integer or Integer operand type to Text.

Email

Phone Number

Converts both operands to Text.

Date Time, Date, or Time

Email or Phone Number

Converts both operands to Text.

Currency

Phone Number

Converts both operands to Text.

See Also

Data Type Conversion Functions | Available Data Types