Filter tasks

What I’m trying to do

Let’s say I have the next tasks in a file:

- [x] Task A [due:: 2022-10-11]
- [x] Task B [due:: 2022-10-12]

- [ ] Task C [due:: 2022-12-11]
- [x] Task D [due:: 2022-12-12]
- [x] Task E [due:: 2022-12-13]

If I put this.file.tasks.checked in the same file, it will show the result:
true, true, false, true, true

I want to replace “true” to “:white_check_mark:”, “false” to “:x:” and “,” to “<br>”.
The result should be:

And filter it again if the due equals the current month.
If the current month = 12, the result will be:

Thanks in advance.

Well… and I want a house in the beach, a comfortable bank account and health. :slight_smile:

This to say: in my point of view, help in forum isn’t a place get tailor-made solutions. It’s a process in both directions: from one side, the wanted goals, the attempts made, the interrogation about the wanted goal according the possibilities of the used plugin, the time to study the documentation and the metadata structure, …; in the other side the clarification of the right/wrong steps, the best path, etc.

If we don’t have that, I can give you these queries and what?

`=join(map(this.file.tasks.checked, (c) => choice(c = true, "✅", "❌")), "<br>")`
`=join(map(filter(this.file.tasks, (t) => t.due.month = date(today).month).checked, (c) => choice(c = true, "✅", "❌")), "<br>")`

What you understand about the functions join(), map(), filter(), choice(), etc.?

(don’t get me wrong… it’s just a statement to “provoke” the other side)


You’re right :slightly_smiling_face:, thanks for the advice and your help.

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