Canned Searches
It is possible to define several pre-defined searches so the user can toggle between
them as needed. This can be done using the API df.addSearch()
.
Use the Organize menu below to see a list of "Searches" to toggle.
Order By
Note that a canned search can define both the search criteria and the sort order. The later is optional. In the above example, the Online Orders search is sorted by Order Date in descending order.
Inheritance
The searches can be defined on any DataFrame. These searches are shared among all the
filtered DataFrames (df.fdf()
) created from the base df that has the canned searches defined.
Note that it is also possible to define canned searches directly on the filtered DataFrame itself.
When this is done, they override the inherited searches (this behavior may change where instead
of overriding they may be augmented).
Canned Field Filters
Apart from the standard search operators such as equals to
, between
and others, SQL Frames
provides pre-canned filter operators for certain field types. This allows users to quickly
filter data without having to enter values.
A canned field filter is created using the cfilter()
API which takes a filter identifier as the
first parameter and a field as second parameter.
Below is the list of canned field filters that are currently supported.
canned filter id | description | data types |
---|---|---|
ld | Yesterday | date, date time |
d | Today | date, date time |
nd | Tomorrow | date, date time |
lw | Last week | date, date time |
w | This week | date, date time |
nw | Next week | date, date time |
lm | Last month | date, date time |
m | This month | date, date time |
nm | Next month | date, date time |
lq | Last quarter | date, date time |
q | This quarter | date, date time |
nq | Next quarter | date, date time |
ly | Last year | date, date time |
y | This year | date, date time |
ny | Next year | date, date time |
Canned field filters can be combined with NOT operator