# Categorise tasks by "assignee" (inline property) using dataview

**URL:** <https://forum.obsidian.md/t/categorise-tasks-by-assignee-inline-property-using-dataview/43345>\
**Category:** Help\
**Tags:** dataview\
**Created:** [September 13, 2022, 9:40am UTC](https://forum.obsidian.md/t/categorise-tasks-by-assignee-inline-property-using-dataview/43345 "2022-09-13T09:40:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![obsidianUser2](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/o/b5e925/32.png) [@obsidianUser2](https://forum.obsidian.md/u/obsidianUser2)\
**Post date:** [September 13, 2022, 9:40am UTC](https://forum.obsidian.md/t/categorise-tasks-by-assignee-inline-property-using-dataview/43345/1 "2022-09-13T09:40:50Z")

</div>

### Things I have tried

I’ve found various posts that solve aspects of what I’m looking for but not fully.  
The closest I’ve come is is by using:

```dataview
TASK FROM "" WHERE contains(text, "#John")

```

A task would look like:

```auto
- [] #John will do XYZ

```

In this setup I will have to create a dataview for each individual and if I haven’t created it yet it will not be on my task overview page which is not ideal. Having to tag each note with the assignee is not an issue.

### What I’m trying to do

I would like to have a list of tasks, grouped by their “assignee” preferably sorted by creation date (oldest first). The assignee can be a tag or other (preferably inline) identifier included in the tag. Ideally it’s a table.

For context: I write a lot of notes during the day as I meet with people.  
From these meetings almost always action items follow. Some of these items (tasks) are for me but others are for those I’ve met with. They are essentially dependencies that I would like to keep track off.

---

<div class="post-metadata">

**Author:** ![Craig](https://forum.obsidian.md/user_avatar/forum.obsidian.md/craig/32/8831_2.png) [@Craig](https://forum.obsidian.md/u/Craig)\
**Post date:** [September 13, 2022, 4:08pm UTC](https://forum.obsidian.md/t/categorise-tasks-by-assignee-inline-property-using-dataview/43345/2 "2022-09-13T16:08:44Z")

</div>

Hi @obsidianUser2, welcome to the community!

I suggest experimenting inline Dataview fields for this. Try annotating your tasks with inline fields, such as “assigned”:

```auto
- [] Paint back room [assigned:: John]
- [] Move furniture into back room
- [] Clean up shed [assigned:: Mary]
- [] Get lumber [assigned:: John]

```

Then you can query it and group it by the field, e.g.:

````auto
```dataview
TASK
FROM "Scratch/Untitled.md"
WHERE assigned
GROUP BY assigned
```

````

Here’s what it looks like in action:

 ![image](https://forum.obsidian.md/uploads/default/original/3X/2/1/21e0cb161966c14fd1b9ce0c5aa4207af545ae1c.jpeg)

---

<div class="post-metadata">

**Author:** ![obsidianUser2](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/o/b5e925/32.png) [@obsidianUser2](https://forum.obsidian.md/u/obsidianUser2)\
**Post date:** [September 14, 2022, 1:29pm UTC](https://forum.obsidian.md/t/categorise-tasks-by-assignee-inline-property-using-dataview/43345/3 "2022-09-14T13:29:07Z")

</div>

He Craig,

Thank you for your fast response and welcome.  
This definitely gives the intended result, awesome!

I am curious about two more things:

1. Is it possible to create a second list where I list only the tasks that don’t have any assignee? (i.e. for myself)
2. It’s not possible to use tags instead of fields? While it works great its just a more characters and syntax to jot down while in conversation with someone.

---

<div class="post-metadata">

**Author:** ![Craig](https://forum.obsidian.md/user_avatar/forum.obsidian.md/craig/32/8831_2.png) [@Craig](https://forum.obsidian.md/u/Craig)\
**Post date:** [September 14, 2022, 3:09pm UTC](https://forum.obsidian.md/t/categorise-tasks-by-assignee-inline-property-using-dataview/43345/4 "2022-09-14T15:09:36Z")

</div>

Good questions, that was interesting to think about.

Yes, you can do the same thing with tags rather than fields. It occurred to me that you might want to assign a task to multiple people, which complicates the query a little bit.

Let’s say this is our task list:

```auto
- [] Paint back room #john
- [] Move furniture into back room #john #mary
- [] Clean up shed #mary
- [] Get lumber #john
- [] Do this one myself

```

You can use a Dataview query to group tasks by the person they’re assigned to:

````auto
```dataview
TASK
FROM "Scratch/Untitled2.md"
FLATTEN tags
GROUP BY tags
```

````

which looks like this:

 ![image](https://forum.obsidian.md/uploads/default/original/3X/a/3/a328c8f3e32b5bfe3c8268bc0a8f322ff4a36614.png)

To make a list of tasks with no assignees (e.g. yourself), you can use a query like this:

````auto
```dataview
TASK
FROM "Scratch/Untitled2.md"
WHERE !tags
```

````

Which looks like this:

 ![image](https://forum.obsidian.md/uploads/default/original/3X/4/3/43df4dd77a7ac3724a421a5383542ef4590d2ade.png)

---

<div class="post-metadata">

**Author:** ![obsidianUser2](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/o/b5e925/32.png) [@obsidianUser2](https://forum.obsidian.md/u/obsidianUser2)\
**Post date:** [September 15, 2022, 9:50am UTC](https://forum.obsidian.md/t/categorise-tasks-by-assignee-inline-property-using-dataview/43345/5 "2022-09-15T09:50:58Z")

</div>

Fantastic!  
This is going to be a great addition to my day to day productivity.  
I’ve made one small tweak to only show tasks that have not been completed yet by adding:

```auto
AND !completed

```

So the code for my tasks is:

```nohighlight
TASK FROM "" WHERE !tags AND !completed

```

And the code for dependencies is:

```nohighlight
TASK FROM "" WHERE !completed FLATTEN tags GROUP BY tags

```

---

<div class="post-metadata">

**Author:** ![james1294](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/j/8baadc/32.png) [@james1294](https://forum.obsidian.md/u/james1294)\
**Post date:** [October 10, 2022, 2:01am UTC](https://forum.obsidian.md/t/categorise-tasks-by-assignee-inline-property-using-dataview/43345/6 "2022-10-10T02:01:14Z")

</div>

Very helpful!

i notice a couple advantages to the inline method.

The biggest being the freedom from tag naming conventions

For example using spaces or backlinks:

```auto
- [] walk the dog [assigned:: [[@Mary]]]
- [] mow the lawn [assigned:: that guy with the nose]

```

less convenient to type out, unless you use text replacement. I’m thinking of replacing `!!` with `[assigned:: `

_bonus: wilk help break my habit of using exclamations to emphasize!!!_

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [January 8, 2023, 2:02am UTC](https://forum.obsidian.md/t/categorise-tasks-by-assignee-inline-property-using-dataview/43345/7 "2023-01-08T02:02:01Z")

</div>

Closed on January 8, 2023, 2:02am UTC

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