plugin:struct:filters
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:struct:filters [2016-08-18 10:01] – [Fixed Filters] andi | plugin:struct:filters [2023-11-01 16:06] (current) – [Fixed Filters] andi | ||
---|---|---|---|
Line 13: | Line 13: | ||
< | < | ||
---- struct table ---- | ---- struct table ---- | ||
- | schemas | + | schema |
cols : %pageid%, product, budget, team | cols : %pageid%, product, budget, team | ||
filter | filter | ||
Line 20: | Line 20: | ||
</ | </ | ||
- | Column names can of course reference the full column name (eg. '' | + | Column names can of course reference the full column name (eg. '' |
===== Comparators ===== | ===== Comparators ===== | ||
Line 26: | Line 26: | ||
For filtering, multiple comparators are possible: | For filtering, multiple comparators are possible: | ||
- | ^ Comparator | + | ^ Comparator |
- | | '' | + | | '' |
- | | '' | + | | '' |
- | | ''<'' | + | | ''<'' |
- | | '' | + | | '' |
- | | ''>'' | + | | ''>'' |
- | | '' | + | | '' |
- | | '' | + | | '' |
- | | '' | + | | '' |
- | | '' | + | | '' |
- | | '' | + | | '' |
+ | | '' | ||
===== Value Placeholders ===== | ===== Value Placeholders ===== | ||
Line 46: | Line 47: | ||
< | < | ||
---- struct table ---- | ---- struct table ---- | ||
- | schemas | + | schema |
cols : %pageid%, product, budget, team | cols : %pageid%, product, budget, team | ||
- | filter | + | filter |
---- | ---- | ||
</ | </ | ||
- | ^ Placeholder | + | ^ Placeholder |
- | | '' | + | | '' |
- | | '' | + | | '' |
- | | '' | + | | '' |
- | | '' | + | | '' |
- | | '' | + | | '' |
- | | '' | + | | '' |
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
===== Dynamic Filters ===== | ===== Dynamic Filters ===== | ||
- | Aggregations can be " | + | Aggregations can be " |
The following example adds filter input fields for all selected columns. | The following example adds filter input fields for all selected columns. | ||
Line 68: | Line 73: | ||
< | < | ||
---- struct table ---- | ---- struct table ---- | ||
- | schemas | + | schema |
cols : %pageid%, product, budget, team | cols : %pageid%, product, budget, team | ||
dynfilters : 1 | dynfilters : 1 | ||
Line 76: | Line 81: | ||
Filters created through this method always use the '' | Filters created through this method always use the '' | ||
- | Dynamic filters can also be added through the '' | + | ==== Manually Creating Filter Links ==== |
+ | |||
+ | Dynamic filters can also be added through the '' | ||
Example: ''? | Example: ''? | ||
+ | |||
+ | For example you could add the above filter to an internal link like this: | ||
+ | |||
+ | < | ||
+ | [[: | ||
+ | </ | ||
+ | |||
+ | When following that link, an aggregation on that page '' | ||
+ | ===== Multiple Filters ===== | ||
+ | |||
+ | If multiple '' | ||
+ | |||
+ | The following example removes all results with the color yellow or green from the result set. | ||
+ | |||
+ | < | ||
+ | ---- struct table ---- | ||
+ | schema: colors | ||
+ | cols: * | ||
+ | filter: color <> yellow | ||
+ | filter: color <> green | ||
+ | csv: 0 | ||
+ | ---- | ||
+ | </ | ||
+ | |||
+ | To combine multiple filters where it is sufficient for any of the conditions to be true, comparable to the OR operator in SQL, you can either work with '' | ||
+ | |||
+ | The following two examples are identical and will only show results where the color is either yellow or green. | ||
+ | |||
+ | < | ||
+ | ---- struct table ---- | ||
+ | schema: colors | ||
+ | cols: * | ||
+ | filteror: color = yellow | ||
+ | filteror: color = green | ||
+ | csv: 0 | ||
+ | ---- | ||
+ | |||
+ | ---- struct table ---- | ||
+ | schema: colors | ||
+ | cols: * | ||
+ | filter: color IN (" | ||
+ | csv: 0 | ||
+ | ---- | ||
+ | |||
+ | </ | ||
+ | |||
+ | Note that the struct plugin currently has no support for the '' | ||
+ | |||
plugin/struct/filters.1471507302.txt.gz · Last modified: 2016-08-18 10:01 by andi