The possible operators that can be used in an expression are presented below.

Numeric

+, -, *, /

See Numeric Operators.

Logical and Boolean

and, or, not, =, <, >, <>, <=, >=

See Logical and Boolean Operators

Like

This operator is only valid in the Filter Condition Editor of an aggregate and allows you to compare results. It has the same semantic as the LIKE keyword in SQL. You can use the LIKE operator to compare with an expression. But the advantage of LIKE is the fact that it allows you to use the wildcard character % that represents one or more characters.

Allowed Data Types

LIKE

Text

Integer

Decimal

Boolean

DateTime

Date

Time

Text

Yes

(a)

(a)

(a)

(a)

(a)

(a)

Integer

(a)

No

No

No

No

No

No

Decimal

(a)

No

No

No

No

No

No

Boolean

(a)

No

No

No

No

No

No

DateTime

(a)

No

No

No

No

No

No

Date

(a)

No

No

No

No

No

No

Time

(a)

No

No

No

No

No

No

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

Example

If you want to select the Identifier for every Customer that contains "James" in its name, in any position, the following filter condition allows you to get this information:

name LIKE '%James%'

Indexer Declaration

This operator is used to access a specific element of a list. In OutSystems, index (position) starts with zero; to access the first record, you have to type the expression as follows:

MyRecordList[0]

When you try to access an index that does not exist, the following runtime error is raised: "Index n is out of range"

 

Since a record can be a sequence of Entities and/or Structures, you can access to a specific Entity or Structure of a specified record:

MyRecordList[0].<entity name | structure name>

 

You can use an expression inside the indexer operator as long as it returns an integer value. This includes the use of User Functions.

MyRecordList[i-1].Customer.Name (i is an integer)

MyRecordList[EmployeeOfMonth()].Employee.Name (where EmployeeOfMonth is a User Function that returns an integer value)

 

The next table presents the precedence of the operators, highest precedence first:

Operator

Description

-

Numeric negation.

NOT

Logical negation.

/, *

Multiplicative operators.

-, +

Additive operators.

<, >, <=, >=

Relational operators.

=, <>

Equality operators.

LIKE

Similarity operator.

AND

Logical AND.

OR

Logical OR.

See Also

Expression Editor | Expression Operands