Filter data - Where prefilter
You can use the
where-prefilter to filter the data the server returns.
The syntax is a bit tricky because the query has to get converted to an sql expression to increase performance.
In this small example only values that start with
testValue are queried.
If you want to define your queries using an array use this syntax.
A basic condition is a tuple of three elements:
[ key, operation, compare value ]
Example: You want to check a single field to equal your value:
['field', '==', 'value']
To combine multiple condition tuples you can wrap them in another tuple of three or more elements:
[condition1, 'and/or', condition2]
Example: You want to check if the field value equals 'value' or 'value2':
[['field', '==', 'value'], 'or', ['field', '==', 'value']]
With this syntax you can create most of the filter expressions.
This example shows how to combine different conditions using or/and. This allows you to create complex conditions.
In this example all values are queried that
test and end with
var and end with