What I’m trying to do
Heya,
my biggest issue in life has been keeping an overview of all the things I want, need and have to do. Ive filled up various apps with all the micro-tasks that I have on my mind but it seems a clear and precise overview of all these tasks has always been missing. Ive been desperately hoping to change that with obsidian.
Now that I am slowly getting the hang of it, I really want to dive deeper into dashboards.
I have searched a lot for two features that would really help me out, but I could not find the solution. I have limited understanding of code, but Im learning each day.
1) Listing all notes in a folder and certain filtered tasks from each of those notes
Example: I run a podcast and I have a folder called “episode concepts”. For each planned episode, I create a new note. In each note, there are various tasks that I need to complete in order for the episode to be relased, such as writing, recording, editing. These tasks have no due dates or priorities as I work on this project when I have time for it (This means these fields could maybe be used for the solution).
Now I imagine it should be possible to have a dashboard, that lists all my planned episode notes and the next step that I need to take for each episode. But I have no idea how to realise this in dataview. Is there even a concept of grouping tasks together as a step-by-step list? Is it needed?In other programming languages I would create a list and then substract items until I reach the first unchecked task and then return that single item.
What I want is a page that gives me a quick and clear overview over the single next steps that I need to take to make progress in various projects. Id also like to be able to call these “next step” tasks from other dashboards, too. Which brings me to question two:
2) Randomly listing a certain amount of tasks that share the same hashtag.
Example: I like to tag my tasks with the effort it wil ltake to complete them. Setting up a dashboard, that gives me an overview of tasks that would take little time to complete is so useful when being on the verge of procastination. I think I should be able to do this myself however it would also be useful to have my Daily Note template randomly display three #small tasks from my vault to complete each day. In this case, it would be great to be able to check each task from the daily note or to at least have it link back to its note.
Things I have tried
I have gotten so far as to display all unchecked tasks from each note from a folder. I would like to reduce the results to only one task per note. However my tries of further filtering these results only affected the notes and not the tasks.
```dataview
TABLE WITHOUT ID file.link AS "Episode", Tasks.text AS Task
from "Episodes"
WHERE file.tasks AND !completed
FLATTEN file.tasks AS Tasks
As for the second question, I have found code that seems to randomly pull a random element here: Dataviewjs Examples - Fork My Brain
Maybe someone can adapt it to return x tasks from a pool of unchecked tasks that share the same hashtag(s).
function randomElements(arr, n) {
var result = new Array(n);
var len = arr.length;
if (n > len) throw new RangeError("randomElements: more elements taken than available");
for (var i = len - 1; i >= len - n; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = arr[i];
result[len - i - 1] = arr[j];
arr[i] = arr[j];
arr[j] = temp;
}
return result;
}
dv.list(randomElements(dv.pages('"TTRPGs/Temporary White Circle"')
.where(b => b.type == "NPC")
.where(b => !b.deceased)
.sort(b => b.file.link)
.map(b => b.file.link),1)
);
I would be very helpful for any pointers. Thank you in advance.