In case you want to torment yourself a little, you can try any of the various scripts, which requires the Type
to be an array.
Various filter() and map() queries
Throw the following in a file:
## List all types
```dataview
LIST join(type, ", ")
FROM "ForumStuff/f51152"
```
## Table query with map & filter
```dataview
TABLE Type,
map(Type, (t) => contains(list("['Grant', 'Competition']"), t)) as M,
filter(Type, (t) => contains(list("['Grant', 'Competition']"), t)) as F
FROM "ForumStuff/f51152"
```
### Limited by filter
```dataview
TABLE Type,
map(Type, (t) => contains(list("['Grant', 'Competition']"), t)) as M,
filter(Type, (t) => contains(list("['Grant', 'Competition']"), t)) as F
FROM "ForumStuff/f51152"
WHERE filter(Type, (t) => contains(list("['Grant', 'Competition']"), t))
```
### Limited by map
```dataview
TABLE Type,
map(Type, (t) => contains(list("['Grant', 'Competition']"), t)) as M,
filter(Type, (t) => contains(list("['Grant', 'Competition']"), t)) as F
FROM "ForumStuff/f51152"
WHERE any(map(Type, (t) => contains(list("['Grant', 'Competition']"), t)))
```
## Finally the same in LIST
```dataview
LIST
FROM "ForumStuff/f51152"
WHERE filter(Type, (t) => contains(list("['Grant', 'Competition']"), t))
```
And adjust the FROM
to match your case.
This could then produce output like the following:
Notice the multitude and variants of list output within the table for the various files, and hopefully you could get some use out of how to combine various filter()
, map()
and any()
function in a query.