holroy
March 3, 2023, 6:48pm
16
tophee:
Works fine. But if one of the queries is empty (e.g. when there are no tasks due today), I would like the respective heading (as well as the “0 tasks” quesry result) to be hidden.
I think I could do this if I’d query the tasks using dataviewjs by simply adding an if-clause, but I prefer the tasks queries. But from what I can see, the task plugin doesn’t allow you to specify conditions for anything else but tasks, so is there any way of conditionally hiding those headers?
I know you prefer the tasks plugin, and those queries, but I recently discovered that when using a dataview TASK
query, hiding the queries can be incredibly easy. It doesn’t require custom CSS, and it doesn’t require any javascript either. See the link below for a little showcase displaying a similar case to your original queries:
Were you aware that we’re actually able to use GROUP BY on TASK queries using dataview? I’ve recently written some queries using GROUP BY for the LIST and TABLE query, and noticed that changes the “first” column from the default file link, into whatever you group by. This got me thinking, what will happen if I do the same to a TASK query? Will it even work, or just do something strange?!
So I set out to test this, and it worked just beautifully, so take a look at the following code:
- [x] Als…