<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Note-Taking on Blog of Jérémie Litzler</title><link>https://iamjeremie.me/tags/note-taking/</link><description>Recent content in Note-Taking on Blog of Jérémie Litzler</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Fri, 21 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://iamjeremie.me/tags/note-taking/index.xml" rel="self" type="application/rss+xml"/><item><title>Building a Self-Excluding Index Note with Obsidian Dataview</title><link>https://iamjeremie.me/post/2026-08/building-a-self-excluding-index-note-with-obsidian-dataview/</link><pubDate>Fri, 21 Aug 2026 00:00:00 +0000</pubDate><guid>https://iamjeremie.me/post/2026-08/building-a-self-excluding-index-note-with-obsidian-dataview/</guid><description>&lt;img src="https://iamjeremie.me/post/2026-08/building-a-self-excluding-index-note-with-obsidian-dataview/2026-08-21-a-stack-of-books-sitting-on-top-of-a-wooden-table.jpg" alt="Featured image of post Building a Self-Excluding Index Note with Obsidian Dataview" /&gt;&lt;p&gt;I have organized a few folders of Obsidian. For each one, I created a single index note at the top. This note lists all the other notes, including their tags, so that I can quickly see them all.&lt;/p&gt;
&lt;p&gt;The most evident instrument for that task is &lt;a href="https://blacksmithgu.github.io/obsidian-dataview/"&gt;Dataview&lt;/a&gt;, the plugin that enables you to question your vault like a tiny database.&lt;/p&gt;
&lt;p&gt;In essence, my desire was straightforward: a table displaying the title and tags of each note in the folder, excluding the index note, since it shouldn’t include itself.&lt;/p&gt;
&lt;h2 id="understanding-from"&gt;Understanding &lt;code&gt;FROM&lt;/code&gt;
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;FROM&lt;/code&gt; in Dataview isn’t a general expression slot. It only accepts a literal source: a folder path as a string, a &lt;code&gt;#tag&lt;/code&gt;, a &lt;code&gt;[[link]]&lt;/code&gt;, or those combined with &lt;code&gt;and&lt;/code&gt;, &lt;code&gt;or&lt;/code&gt;, and &lt;code&gt;-&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It lacks any notion of `this` and can’t evaluate dynamic field accesses such as `this.file.folder` at parse time. This is because the source must be resolvable before the query starts running. However, `WHERE` and `TABLE` are evaluated per row, which is where expressions like `this.file.folder` and `this.file` should be evaluated.&lt;/p&gt;
&lt;p&gt;In my initial version, I had included a row-based expression in a section that can only handle literal values, causing the parser to highlight that specific line rather than those surrounding it.&lt;/p&gt;
&lt;h2 id="two-working-versions"&gt;Two working versions
&lt;/h2&gt;&lt;p&gt;To build what I needed, I had two options:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;TABLE file.tags AS &amp;#34;Tags&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;WHERE file.folder = this.file.folder AND file != this.file
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;SORT file.name ASC
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This kept the resilience I was after in the first place. Comparing `file.folder` against `this.file.folder` ensures that the query will find the right notes, even if the folder is renamed or moved, since both sides of the comparison are evaluated fresh each time the query runs.&lt;/p&gt;
&lt;p&gt;The downside is that this version scans the entire vault and filters afterwards, rather than narrowing the search at the start.&lt;/p&gt;
&lt;p&gt;For a small vault that’s not something I’d notice, but if you want to avoid the full scan, &lt;code&gt;FROM&lt;/code&gt; still works fine as long as you give it what it actually wants: a literal path.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;TABLE file.tags AS &amp;#34;Tags&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;FROM &amp;#34;path/to/folder&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;WHERE file != this.file
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;SORT file.name ASC
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;That version is faster, but it stops working silently if the folder is ever renamed. Nothing errors out; the index note just stops listing anything, since `FROM` keeps pointing at a path that no longer exists.&lt;/p&gt;
&lt;p&gt;I went with the first version as my default. I’d rather trade some query speed for the ability to rename a folder without having to remember to correct an index note somewhere else. For now… I’ll see if my choice remains the same as my vault grows.&lt;/p&gt;
&lt;h2 id="lets-keep-in-touch"&gt;Let’s Keep in Touch
&lt;/h2&gt;&lt;p&gt;If you liked this article…&lt;/p&gt;
&lt;div class="jli-notice jli-notice-tip" id="Follow me" &gt;
&lt;p class="jli-notice-title"&gt;Follow me&lt;/p&gt;&lt;p&gt;Thanks for reading this article. Make sure to &lt;a href="https://x.com/LitzlerJeremie"&gt;follow me on X&lt;/a&gt;, &lt;a href="https://iamjeremie.substack.com/"&gt;subscribe to my Substack publication&lt;/a&gt; and bookmark my blog to read more in the future.&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Credit: Photo by Brian Huynh on Unsplash.&lt;/p&gt;</description></item></channel></rss>