[Dataview] file.tasks.completed not working properly

Context

I’m trying to create a “To do” page to make new tasks very easy to make and manage.
Because i want it to be the most organized possible, i made 6 checkboxes in my “to do” template (“Administration”, “School”, …).
I want to display the title of the completed checkbox in my “To do” home page

Things i’ve tried

I read the documentation about dataview a couple times and tried each tasks annotation, but none really works with what i’m trying to do.
In fact the ‘file.tasks.completed’ should only results the checked tasks if i understood correctly, so i tried using it with WHERE but it doesn’t work, instead it displays all the tasks even if they are not “completed”.

Current state

TABLE WITHOUT ID file.link AS File, choice(Tasks.completed, Tasks.text, "\-") AS Type
FROM [[_002 Todo MOC]]
WHERE file.name != "Todo Template"
FLATTEN file.tasks AS Tasks
SORT Tasks.completed DESC

image

image

Conclusion

I want to remove the blank fields from the table, i thought that maybe i could do it with dataviewjs but i don’t want to spend so much time just to do this.
Thanks for anyone responding to my request.

Topic

Summary
  • How to show the result that contains completed tasks?

Test

Summary
  • dataview: v0.5.41

Input

Summary

dictionary files

  • Location: “100_Project/02_dataview/Q14_Tasks/Q14_test_data”
  • filename : dic_19970301
---
Date: 1997-03-01
---

## input
### main tasks
- [ ] 1997-03-01 add this feature_a #Test/d01 [[Note P]] , [[Note Q]]
- [ ] 1997-03-02 add this feature_b #Test/d02  [[Note P]]
- [ ] 1997-03-03 add this feature_c  [[Note Q]]
- [ ] 1997-03-04 add this feature_d #Test/d04
- [ ] 1997-03-05 add this feature_e  #Test/d05 [[Note Q]]
- [ ] 1997-03-06 add this feature_f  #Test/d06
- [ ] 1997-73-07 add this feature_g #Test/d07
- [ ] 1997-03-08 add this feature_h [[Note P]] , [[Note Q]]
- [ ] 1997-03-09 add this feature_i 
- [ ] 1997-03-10 add this feature_j  
- [ ] It is finished!
- [x] Administration



  • filename : dic_19970401
---
Date: 1997-04-01
---

## input
### main tasks
- [ ] 1997-04-01 add this feature_a #Test/d01 [[Note P]] , [[Note Q]]
- [ ] 1997-04-02 add this feature_b #Test/d02  [[Note P]]
- [ ] 1997-04-03 add this feature_c  [[Note Q]]
- [ ] 1997-04-04 add this feature_d #Test/d04
- [ ] 1997-04-05 add this feature_e  #Test/d05 [[Note Q]]
- [ ] 1997-04-06 add this feature_f  #Test/d06
- [ ] 1997-74-07 add this feature_g #Test/d07
- [ ] 1997-04-08 add this feature_h [[Note P]] , [[Note Q]]
- [ ] 1997-04-09 add this feature_i 
- [ ] 1997-04-10 add this feature_j 
- [ ] It is finished!
- [x] Projects



  • filename : dic_19970501
---
Date: 1997-05-01
---

## input
### main tasks
- [ ] 1997-05-01 add this feature_a #Test/d01 [[Note P]] , [[Note Q]]
- [ ] 1997-05-02 add this feature_b #Test/d02  [[Note P]]
- [ ] 1997-05-03 add this feature_c  [[Note Q]]
- [ ] 1997-05-04 add this feature_d #Test/d04
- [ ] 1997-05-05 add this feature_e  #Test/d05 [[Note Q]]
- [ ] 1997-05-06 add this feature_f  #Test/d06
- [ ] 1997-75-07 add this feature_g #Test/d07
- [ ] 1997-05-08 add this feature_h [[Note P]] , [[Note Q]]
- [ ] 1997-05-09 add this feature_i 
- [ ] 1997-05-10 add this feature_j 
- [ ] It is finished!
- [x] Other




DQL10_flatten_fTasks_and_display_completed_tasks_only

Summary

Main DQL

Code Name Data type Group By Purposes Remark
DQL10_flatten_fTasks
_and_display_completed_tasks_only
file.tasks no 1.To flatten file.tasks and let T = each element of file.tasks of each page;
2.To fiter by completed tasks
3.To display the result as a table

Code DQL10_flatten_fTasks_and_display_completed_tasks_only

Summary_code
title: DQL10_flatten_fTasks_and_display_completed_tasks_only =>1.To flatten file.tasks and let T = each element of file.tasks of each page; 2.To fiter by completed tasks 3.To display the result as a table
collapse: close
icon: 
color: 
```dataview
TABLE WITHOUT ID 
      file.link AS "File",
      choice(T.completed, T.text, "\-") AS "Type"
      
FROM "100_Project/02_dataview/Q14_Tasks/Q14_test_data"

FLATTEN file.tasks AS T
WHERE T.completed

```

Screenshots(DQL10)


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