SUBSET OF
This function returns TRUE if the items in a collection are all present in another collection.
Syntax Code Block |
---|
collection1 SUBSET OF collection2 |
Inputs
Return type
Venn diagram
Examples Expression | Result | Type | Note |
---|
( 'a' , 'b' , 'c' ) SUBSET OF ( 'a' , 'b' , 'c' , 'd' ) | TRUE | Booleanboolean |
| ( 'a' , 'b' , 'c' , 'd' ) SUBSET OF ( 'a' , 'b' , 'c' ) | FALSE | Booleanboolean |
| Person.hobbies SUBSET OF [ "Tennis" , "Soccer" , "Music" ] Given Person.hobbies = [ "Tennis" , "Soccer" ] | TRUE | Booleanboolean |
| Person.hobbies SUBSET OF [ "Tennis" , "Soccer" , "Music" ] Given Person.hobbies = [ ? ] | ? | Booleanboolean |
| Person.hobbies SUBSET OF [ "Tennis" , "Soccer" , ? ] Given Person.hobbies = [ "Tennis" , "Soccer" ] | FALSE | Booleanboolean | [ "Tennis" , "Soccer" , ? ] evaluates to [ ? ] Person.hobbies SUBSET OF [ ? ] = FALSE | ( 'a' , 'b' , 'c' ) SUBSET OF ( [ 'a' , 'b' , 'c' , 'd' ] ) | Error |
|
| 1 SUBSET OF Address.Numbers Given Adress.Numbers = ? | FALSE | Booleanboolean |
|
UI Text Box |
---|
| Values between single quotes are considered value list items. For backwards compatibility reasons, a comma separated sequence of value list items is treated as a collection. That's why there is no need to enclose the values between square brackets. In fact if you do add the square brackets you create a matrix rather than a list. |
|