Dataview/DataviewJS plugin with obsidian-reminder plugin

I am new to dataview. I am learning. I tried few ways for the below issue. I also posted the query in discussions group of the plugin.

What i am trying to do?
I was trying to build a table/task checkbox list showing all my tasks like due today, this week tasks, this month tasks, no due date tasks so i can use them on a dashboard/inbox kind of thing

I am using obsidian-reminder plugin with tasks in this format

  • [ ] This is a task (@2022-05-28 11.00)
  • [ ] This is another task (@2022-06-03 12.00)
  • [ ] One more (@2022-06-04 13.00)

How can i create a dataview query to show the above tasks like due today, this week, this month, no due date along with sorting

I can achieve this with obsidian-tasks plugin. But i want to make it work with obsidian reminder plugin to avoid bloating of the tasks by using 2 plugins. If anyone has suggestions

I’m not sure how to do this with dataview, but the reminder plugin has a build-in panel that display’s exactly what you are asking for. It should appear in the right sidebar. If you don’t see it, open the command pallet and search for reminder, show reminders.

Editing to add: If you’re asking about dataview because you want to get all tasks onto a single list, including those without reminders attached, it would be worth putting in a feature request for the reminder plugin. I’d like to see a list of undated tasks at the bottom of the list or something like that. The plugin would have to scan the entire vault to collect those tasks and could be a performance hit. Maybe as an option would be great.

1 Like

hmm.
Not an easy thing because you don’t have a valide field inside task text to check a date.

If you have this:

- [ ] This is a task (duedate:: 2022-05-28)
- [ ] This is another task (duedate:: 2022-06-03)
- [ ] One more (duedate:: 2022-06-04)

You can query with this (for today notes):

TASK
WHERE duedate = date(today)

But to retain your actual format you need to manually create a date from the text in task.
I guess it will an ugly thing with regex…

I’m a dumb in regex but I found this weird regex code with two conditions: \s[^\s]*$|.*@ (I think it means something like: “remove everything after the last space and remove everything before @”… but I’m not sure - any expert in regex can help better)

The goal is: from “This is a task (@2022-05-28 11.00)” (the task text) to this 2022-05-28 (a form to transform on date).

So, the logic for the query can be something like:

  • for today tasks
TASK
WHERE date(regexreplace(text, "\s[^\s]*$|.*@", "")) = date(today)
  • for this week tasks
TASK
WHERE dateformat(date(regexreplace(text, "\s[^\s]*$|.*@", "")), "yyyy-WW") = dateformat(date(today), "yyyy-WW")
SORT date(regexreplace(text, "\s[^\s]*$|.*@", "")) ASC
  • for this month tasks
TASK
WHERE file.path =this.file.path
WHERE dateformat(date(regexreplace(text, "\s[^\s]*$|.*@", "")), "yyyy-MM") = dateformat(date(today), "yyyy-MM")
SORT date(regexreplace(text, "\s[^\s]*$|.*@", "")) ASC
  • …

grrrr. ugly, ugly queries.

good luck

1 Like

Yes there is a panel on the side bar. But it will just give the info but no provision for a checkbox to check if the task is complete

Thanks @mnvwvnm
I tried this and its working. But sometimes the monthly tasks just disappears. So i think this is not stable queries.
So i decided against making using this feature like that and will just use the default view that the reminder plugin gives on the side panel

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