gpt-4.1-mini-2025-04-14· OpenAI
WildChat-4.8M (AI2)
how do I show a true false in a dataview query as a checkbox?
- User
how do I show a true false in a dataview query as a checkbox?
- Assistant
In Obsidian's Dataview plugin, if you want to display a boolean (true/false) value as a checkbox in your query results, you can use inline HTML or Unicode characters to simulate checkboxes, since Dataview itself doesn't natively render checkboxes.
Method 1: Using the Unicode checkbox characters
You can map
trueandfalseto checked and unchecked box characters:TABLE (this.completed ? "☑️" : "⬜") AS "Done" FROM "your-folder"Explanation:
this.completedis your boolean field- If
true, show☑️(checked box) - If
false, show⬜(empty box)
Method 2: Using inline HTML with checkboxes (if your theme allows rendering HTML in tables)
TABLE (this.completed ? "<input type='checkbox' checked disabled>" : "<input type='checkbox' disabled>") AS Done FROM "your-folder"