Page History
Panel | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
DIFFERENCEThis function returns Determines the difference between 2 collections. Returns a collection containing all the items from collection1 that are not present in collection2. Syntax
Inputs
Return type
Venn diagram Examples
|
bgColor | white |
---|
SYMMETRIC_DIFFERENCE
This function determines the symmetric difference between two collections. It returns a collection with the elements of the provided collections which are in either one of the collections, but not in both.
Syntax
Code Block |
---|
SYMMETRIC_DIFFERENCE ( collection1 , collection2 ) |
- collection1, collection2 - Collections to be compared. These collections must be of the same base type.
Return type
- collection
Venn diagram
Examples
Back to top |
---|
Panel | |||
---|---|---|---|
| |||
A note on collections and duplicatesAn expression resulting in a collection does not contain duplicates. Please be aware however, that intermediary results of a This is best illustrated with the following examples. | |||
Person instance | Person.Name | Person.Age | |
Person_1 | Kim | 24 | |
Person_2 | Rick | 25 | |
Person_3 | Bob | 25 | |
Expression | Result | Type | Note | COLLECT Person.Age FROM ALL Person | [ 24 , 25 ] | String (multivalued) |
SIZE ( COLLECT Person.Age FROM ALL Person ) | 3 | Integer | The intermediary collection is [ 24, 25, 25 ] |
TSL: The ages present are: [[[ COLLECT Person.Age FROM ALL Person ]]]. | The ages present are: 24, 25, 25. | String | The intermediary collection is [ 24, 25, 25 ] |
SIZE ( UNIQUE ( COLLECT Person.Age FROM ALL Person ) ) | 2 | Integer | The duplicates in the intermediary collection are filtered by the UNIQUE function |
Person instance | Person.Name | Person.Age | |
Person_2 | Rick | 25 | |
Person_3 | Bob | 25 | |
Expression | Result | Type | Note | COLLECT Person.Age FROM ALL Person | [ 25 ] | Integer (multivalued) | UNPACK ( COLLECT Person.Age FROM ALL Person ) | Error | The collection contains 2 elements [ 25 , 25 ] | UNPACK ( UNIQUE ( COLLECT Person.Age FROM ALL Person ) ) | 25 |
UI Text Box | |||
|
Back to top |
---|