Pick function
Returns elements of a data field that correspond to a condition
Description
The Pick function searches for all items in a list or table that match a specific condition. The condition is formulated in the second parameter.
Condition
The condition is passed in a text string. The string "# < 5" searches for all elements whose value is less than 5. The rhombus stands here as an icon for the list or table being searched.
Lists
In the case of lists, the result is also a list in which only the elements corresponding to the condition are contained.
Tables
If the first argument is a table, the third argument must be the number of a column to search. The result is a table that contains the rows whose reference column matches the condition.
Syntax
Pick (list, "# < x")
Pick (table, "# < x", column)
Examples
![]()
In the first example below, the results contain the values that are less than 5 in the result.
In the second example, the result is the lines whose value in the 2nd column is less than 5.
Comparison operators and input via keyboard
Enter keys | ||||
< | less than | < | ||
> | greater than | > | ||
≤ | less or equal | <= | ||
≥ | greater or equa | >= | ||
≡ | equal | == | ||
≠ | unequal | <> |
Data field based functions
ClrRect | Deletes a rectangular area |
Clip | Limits values of a data field |
Count | Returns number of elements |
Diff | Difference values of elements |
Dim | Number of dimensions of tables |
Flat | Joins rows of a table |
GetAt | Value of a specified position |
GetRect | Returns the specified area |
Insert | Inserts new elements |
Join | Join fields together |
New | Generates a new list |
Pick | Get selected items from a list |
Remove | Removes items from a list |
Reverse | Inverts the order in a list |
Scale | Converts values to a new scale |
SetAt | Sets a value at a position |
Split | Splits a list into sublists |
Sum | Returns the sum of all elements |
Text | Generates a text list |
Trim | Removes invalid values |