How to search checkmark/checkbox properties?

What I’m trying to do

I am trying to search/filter my files according to the state of a checkbox property, i. e. the true or false value.

Things I have tried

When searching for the checkbox property key without a value, the search works correctly and outputs all files that are annotated with the property. However, when given a value, no files are matched. I have tried: “true”, “false”, “True”, “False”, “0”, “1”, “-1” and more.
Interestingly, when giving “/.*/” as a value, the search still fails to match any files. Searching for other property types with this placeholder key works as expected.

I thought I’d leave a help topic before creating a bug report.

1 Like

Does one of these help?

## 2 Checkbox

```query
[checkbox1:]
```

```query
[checkbox2: false]
```

```query
[checkbox3: "True"]
```

```dataview
TABLE WITHOUT ID 
file.link
FROM ""
WHERE Checkbox2 = "false"
```

```dataview
TABLE WITHOUT ID 
file.link
FROM ""
WHERE contains(Checkbox3, "true")
```

The first one works normally, as described in my post. The second and third do not work, I have tried these already.
I’ve just installed the dataview plugin to test the last 2. The checkbox property appears to be a boolean (and the key name is “done” btw). This works:

TABLE WITHOUT ID 
file.link 
FROM ""
WHERE !done 

However, this should be possible from the search bar. The search bar even has autocomplete suggestions for all properties. Either this is a missing feature or I am missing something. The problem is likely connected to the value type being boolean.

I’m also noticing this. I have a checkbox property in my files. In the search and graph view, [eligible] and [eligible:] works. However, I can’t seem to filter the files based on whether it is true or not.

[eligible:true] doesn’t seem to work, which it should according to the docs.

1 Like

For now, try putting true outside the brackets for a text search.


I have another checkbox property inside my metadata, so writing true outside shows results for both the properties when I only want to target one.

1 Like

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