All Tasks in the current file not working when Task is indented

What I’m trying to do

Get a list of all Tasks in a file. I have timestamped sections in the file where I can put specific notes and tasks (I tab in underneath a date field I use as the section header) regarding the meeting that happened in that section.

Things I have tried

I tried following this [How to get tasks in current file - Tasks User Guide - Obsidian Publish](How to get all tasks in the current file) but it shows blank. If I back out a task from the indented section it displays but once it’s in a section, it doesn’t show up top.

You’re most likely messing with the markdown format so the tasks are not recognised. Try adding a newline in front of the task, or don’t “tab in” the task.

In either way, showing us the actual offending text with surrounding text lines can help us to further track your actual case. Please enclose the text in three or more backticks before presenting it here in the forum.

```tasks
not done
path includes path includes {{query.file.path}}
```

Is the code I am using up top.

I really was hoping to be able to be ‘tabbed into’ each section so I would know which meeting/date the tasks were created.

Any particular reason you’ve doubled up on the path includes part?

And even with that fixed, you’re not showing how close your task is related to the other markdown blocks, which also might be an issue.

If you click the link in the first post that’s how the Obsidian team recommends to do the double paths. I am new so I don’t understand just following orders :grinning:.

I am not sure I understand your second question.

That’s indeed a typo on the Tasks team website, which you should report on their github page.

The example should read something more like:

```tasks
not done
path includes {{query.file.path}}
```

The placeholder should then work, if your Tasks version is newer than 4.7.0.

I cleaned up the code and verified my Tasks is on version 4.9 and still have 0 tasks up top

Then there is most likely something related to how you’ve written your tasks. Try removing the indentation, or inserting a line before the tasks. Or try adding a separate task on a line completely on its own.

And the second part I was asking for is what have you written in your note around the text “Bryce will send us… Complete Phase 0”. Insert that as text in between triple backticks, not as an image.

Something like:

```
> Bryce will send us ...
> 
- [ ] #todo #Casey Complete Phase 0
```

This will help us tell why your task is not conformant (as I suspect is the case) and doesn’t show up in your task query.

My section below the notes doesn’t start with the three back ticks. I just started typing

Using just a tab to indent the text doesn’t produce markdown where the task is recognised as a task. I’d either shift to using lists or callouts to achieve better formatting and valid markdown where the tasks are recognised.

Try the following in a file of its own and see the difference:

```tasks
not done
path includes {{query.file.path}}
```


10/5/23 Kickoff Meeting
	Bryce, Sabrina, and Mike from Prophix on call
	Bryce will send file
	File will be used for validation
	[ ] #todo #Casey Complete phase 0

- 10/5/23 Kickoff Meeting
	- Bryce, Sabrina, and Mike from Prophix on call
	- Bryce will send file
	 - File will be used for validation
	 - [ ] #todo #Casey Complete phase 1

> [!info]+ 10/5/23 Kickoff Meeting
> Bryce, Sabrina, and Mike from Prophix on call
> Bryce will send file
> File will be used for validation
> - [ ] #todo #Casey Complete phase 2

In my setup this renders as the following:

And as you can see both of the last two examples tasks are listed in the query at the top, whilst the first example is not a valid task so it’s not showing in the query results.

That worked great. I really like that > [!info]+ tag. I think I will use that going forward. Thank you for helping me out.

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