Comments (10)
Yay, this is finally doable! Thanks to @sheeley for the implementation!
TASK WHERE contains(text, "#tag")
from obsidian-dataview.
I have good news and bad news. The good news is this is possible; the bad news is it requires a tiny bit of JavaScript:
```dataviewjs
dv.taskList(dv.pages("#project").file.tasks.where(t => t.text.includes("#tag")));
```
from obsidian-dataview.
Yes.
```dataviewjs
dv.taskList(dv.pages("#project").file.tasks.where(t => t.text.includes("#tag") && !t.completed));
```
from obsidian-dataview.
Yes.
```dataviewjs dv.taskList(dv.pages("#project").file.tasks.where(t => t.text.includes("#tag") && !t.completed));
I notice that this will only catch if the task is without indentation. If the task is indented (like in a nested task list) it does not work for me. Perhaps a bug?
Example:
- [ ] Test task #tag → this works
- [ ] Test task 2 #tag → This does not work
from obsidian-dataview.
Full task support with tag filtering, on-complete, and so on is upcoming. I'll also fix a few bugs with the view which may cause task checkboxes to not work properly, since you should be able to check them to check the original task...
from obsidian-dataview.
Is it possible to list the pages that the tasks come from as well? This works beautifully, but it is only rendering the task itself. I'd like the extra context of pages, if possible.
from obsidian-dataview.
It also only appears to re-render on file open. Is that a bug?
from obsidian-dataview.
I have good news and bad news. The good news is this is possible; the bad news is it requires a tiny bit of JavaScript:
```dataviewjs dv.taskList(dv.pages("#project").file.tasks.where(t => t.text.includes("#tag")));
Is there a way to combine this with tasks that are not completed so that only those that are not completed show?
from obsidian-dataview.
@blacksmithgu looking at this, it appears we should have an in
, includes
, or contains
function. Did you have a preference?
from obsidian-dataview.
We should add an inline in
operator: 6 in [1, 2, 6]
, #tag in file.tags
, and so on. There is already a non-inline contains(file.tags, #tag)
for people who prefer that syntax, and lists will be getting a contains method later: file.tags.contains(#tag)
.
from obsidian-dataview.
Related Issues (20)
- Default search queries HOT 1
- Bug report - Cursor doesn't get placed correctly
- Bug report - inlinefield rendered inside a inline code and it make a mess HOT 1
- Dataview causes screen flickering. HOT 1
- Vulnerability HOT 4
- Implement `title` field for first H1/H2 heading (if no title field exists) HOT 1
- codeblock with "=" causes a PARSING FAILED HOT 2
- Table query suddenly shows only the number of results but not the results anymore HOT 3
- Vscode extension for data view plugin HOT 4
- Inline queries aren't rendered anymore (Desktop only) HOT 1
- Bug report DataView can not render emoji character and show as null HOT 5
- Bug report HOT 14
- Bug report HOT 2
- Embedded notes miss link to note HOT 1
- glob pattern matching HOT 4
- Bug report- the task from in the dataview can not display and cause the obsidian helper(Renderer) CPU used 100% HOT 3
- Dataview do not update results HOT 1
- Bug report dv.lists Evaluation Error: TypeError: e is not a function HOT 2
- Calculated table columns repeats the value
- Dataview breaks links in preview mode when linking to aliases that include ::
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obsidian-dataview.