Dataview list of files as checklist

Things I have tried

I thought I could do what I want using

```dataview
TASK
etc...

So I searched for examples until I realized this only works with lines of text with checkboxes in front and a tag or due date on the same line

What I’m trying to do

What I’m looking for is the equivalent of this:

```dataview
 LIST 
 FROM #work

but instead of getting a straight list I’d like to at least get the same list but with checkboxes.

Best case scenario I’d also like to be able to have checking the boxes toggle some tag in the file or something like that.

Is that even possible with dataview (or some other plugin?)

if tag is placed at top of file like this:

---
tags: tag1, tag2
---

note: keep “—” before and after tags.

You can search checking boxes in the file by tags, like this:

---dataview
task from #tag1

if you want find some checking boxes placed under a specific heading, type code like this

---dataview
task
from "filename or tags or path" 
where contains(meta(section).subpath, "heading name") and !completed
sort file.name

you can find infornation of checking boxes like this:

---dataview
list file.tasks from ......

1 - Why a task query if you’re not looking for tasks?
2 - Why you want to add a “checkbox”? it’s possible to render a checkbox, but it’s a simple visual thing, without any “action” associated! you’ll check/uncheck what?
3 - In dataview, tasks are the only kind of queried things with interaction with the raw content (the real task). In case, if you check/uncheck the rendered tasks, that action “write” in the raw content (adding/removing the “x” in the checkbox). In dataview, there’s no other cases where you can interact with the raw content (the “write in the file”).

I’m not looking for tasks within files, I’m looking for files themselves and treating the files as tasks.

I want the action of the checkbox to toggle a custom action, for example toggle the tag “done” within the file

Do you think this doesn’t exist yet? Maybe its within the realm of javascript or something. I know how to do things in bash scripting - maybe somehow you could tie in the checkbox action to a custom bash script…

(or maybe I should just rethink my entire “file as task” strategy, ha ha)

One good thing with alwaysFindFood’s examples it shows me that you don’t have to tag your todos with #todo on each line to get that system to work :slight_smile:

If you’re looking to manage pages in a task-like way, you might consider trying the excellent Obsidian Kanban plugin. You can use it to arrange links to your pages into columns and move them from, say, a “To Do” column to a “Done” column.

my only suggestion may or may not work for you but it would be to change the title of the note to start with the unicode characters :white_square_button: :white_check_mark:. This is based on a task management principle another user created I would attribute to them but I cannot find their original posting.

But this may not work like you want either unless someone has a dataview method to rename the file. I recall they were using Alfred to implement it and I have been using Espanso as a limited alternative.
However recently I have just been tossing todos everywhere and using a dataview to pull them. even when they are just for that specific file.

Maybe exploring a mix of: Dataview, Buttons and MetaEdit (I never tested):

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.