conjsel(L)
Returns a selection expression that consists of the conjunction of the pairs of columns and associated values specified in the given list-value. (Available as of version 11.06)
Description
This function is generally intended for use with the value of the
listvalue_
attribute returned by the querytree
widget.
Together with the expanded selection form for <sel>
introduced in
version 11.05, this allows efficient application of a querytree
-generated
selection. For more information, see class_="querytree"
and <sel>
.
Syntax
conjsel(L)
Input
Argument | Type | Description |
---|---|---|
L |
list-value | A list-value that consists of n lists. Each list is made up of a column and a list of values. |
Return Value
Returns a selection expression of the form ([EXPR_1])&([EXPR_2])&...&([EXPR_n]), where each [EXPR_x] is of the form [COLUMN]=[LIST_OF_VALUES].
Example
The following example demonstrates how conjsel(L)
function builds a
selection expression from the given list-value. In this example, conjsel(L)
creates the expression (state='NY''CA''TX')&(tz='-5''-6')
from the
list-value selections
.
<dynamic selections="{lst(lst('state' lst('NY''CA''TX'))lst('tz' lst('-5''-6')))}"> <layout arrange_="v"> <widget class_="value" value_="@selections"/> <widget class_="text" text_="conjsel: {conjsel(@selections)}"/> <widget class_="grid" base_="pub.demo.weather.stations"> <sel value="{conjsel(@selections)}"/> </widget> </layout> </dynamic>