List Operation

2 minutes to read Download PDF Edit

List operations perform various actions on a list. See below for details on these actions.

Operation Types

A list operation action can execute any of the following types of operations.

Binary

These binary operations have as an input a list and either another list or an object. The resulting type depends on the type of the operation. All lists and objects must relate to the same entity.

OperationDescriptionResult Type
UnionThe result is a combination of the elements of both parameters avoiding duplicates.List
IntersectThe result is a list containing elements that appear in both parameters.List
SubtractThe result is the first parameter with the element(s) of the second parameter removed.List
ContainsChecks whether all elements of the second parameter are present in the first parameter.Boolean
EqualsChecks whether the lists contain the same elements.Boolean

Sort

OperationDescriptionResult Type
SortAllows you to sort a list based on a number of a attributes. The attributes are ordered to determine their priority while sorting. The input list remains in its original order while the sorted list is stored in the output variable.List

Attribute Inspections

These operations take a single list and an attribute as input. The resulting type depends on the type of the operation.

OperationDescriptionResult Type
FindFind the first object of which the attribute has the given value.Object
FilterFind all objects of which the attribute has the given value.List

Unary

These unary operations have a list as input and either an object or another list as a resulting type, depending on the operation.

OperationDescriptionResult Type
HeadThe result is the first element of the list, or empty if the parameter contains zero elements or was initialized as empty.Object
TailThe result is a list containing all elements of the parameter except the first, or an empty list if the parameter contains zero elements or was initialized as empty.List

Output Properties

Variable name

The variable name defines the name of the resulting list, object or boolean. It can be used by all activities that follow this activity.

Copyright © Mendix. All rights reserved. | Mendix.com | Terms of Use | Privacy Policy