How to exclude query when inline fields are empty?

Things I have tried

I have searched the help documents on Dataview but seem to miss the info I am looking for. Checked in with a experienced Obsidian user but they were also unable to see what I am doing wrong.

What I’m trying to do

In some Dataview tables I can only get results when inline fields are filled by simply stating
WHEN InlineField > “” This also works if the syntax includes data from Front matter. Other times this will not work. I can’t seem to find what the difference is for it not working and when it does.

For instance, Gewicht is a inline field I fill out every day and than add in a overview. WHEN Gewicht > “” works to exclude days in the overview where I didn’t fill out Gewicht.

In a week note I add priorities for the next week with inline field prio. WHEN prio > “” will give zero results. I tried changing it to != “-” or 0 but that didn’t work.

So, this gives all 15 notes with Week in the folder zJournal

table without id prio AS Weekprio
from "zJournal"
where contains(file.name, "week")

While this gives zero results.

table without id prio AS Weekprio
from "zJournal"
where contains(file.name, "week") AND prio > ""

Anyone that can offer advice or a source?

Thanks in advance,

Arjan

Any of these?

1
```dataview
table without id prio AS Weekprio
from "zJournal"
where contains(file.name, "week")
```

2
```dataview
table without id prio AS Weekprio
from "zJournal"
where contains(file.name, "week") AND prio > 0
```

3
```dataview
table without id prio AS Weekprio
from "zJournal"
where contains(file.name, "week") AND !prio 
```

4
```dataview
table without id prio AS Weekprio
from "zJournal"
where contains(file.name, "week") AND prio !=1
```

5
```dataview
table without id prio AS Weekprio
from "zJournal"
where contains(file.name, "week") AND prio <=1
```

6
```dataview
table without id prio AS Weekprio
from "zJournal"
where contains(file.name, "week") AND prio >=1
```

7
```dataview
table without id prio AS Weekprio
from "zJournal"
where contains(file.name, "week") AND prio 
```

They all yield different results in my tests, but not sure I understand the ultimate goal here. Sorry.

Angel

1 Like

Hi Angel,

I saw nr 7 first and that did the job!

I want to add priorities in a week note and see them in the next week’s note to report on them and see them in my Today dashboard. So, now I type them in the week note as

prio: Do things

and add the Dataview to other notes.

Thanks again!

I’ll save the other suggestions and test them,

Arjan

1 Like

Good to hear one of them worked.

Angel

1 Like

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