# Dataview - query files that link to a file that links to this file (using property links)

**URL:** <https://forum.obsidian.md/t/dataview-query-files-that-link-to-a-file-that-links-to-this-file-using-property-links/116792>\
**Category:** Help\
**Tags:** properties, dataview, internal-links\
**Created:** [August 2, 2026, 5:31pm UTC](https://forum.obsidian.md/t/dataview-query-files-that-link-to-a-file-that-links-to-this-file-using-property-links/116792 "2026-08-02T17:31:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Falkvard](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/f/47e85d/32.png) [@Falkvard](https://forum.obsidian.md/u/Falkvard)\
**Post date:** [August 2, 2026, 5:31pm UTC](https://forum.obsidian.md/t/dataview-query-files-that-link-to-a-file-that-links-to-this-file-using-property-links/116792/1 "2026-08-02T17:31:54Z")

</div>

Hello,

### What I’m trying to do

I am making a worldbuilding vault for a novel. In my notes I have a note type “place” - every important place in the world has it’s note. Some places have a “superior place” as a frontmatter property.

For example a “Tree A” has a superior place “Forest B”, which has a superior place “Geo area C”, which is has a superior place “Continent D”

I only put the first superior place into the properties.

For each “place” note i want an overview of all sub-places. For 1st degree sub-place I can easily query

```auto
dataview
table WITHOUT ID file.link AS place,
FROM "Places"
WHERE contains(superior_places,[[]])

```

but thats as far as I got.  
I want to list all the stuff on Continent D even though they are not linked directly.

I do not want to use any specific folder or note names in the query, because I link this (or similar) snippet on every note using dataviewjs → dv.paragraph.

Thanks for any ideas.

---

<div class="post-metadata">

**Author:** ![dawni](https://forum.obsidian.md/user_avatar/forum.obsidian.md/dawni/32/79261_2.png) [@dawni](https://forum.obsidian.md/u/dawni)\
**Post date:** [August 2, 2026, 10:24pm UTC](https://forum.obsidian.md/t/dataview-query-files-that-link-to-a-file-that-links-to-this-file-using-property-links/116792/2 "2026-08-02T22:24:38Z")

</div>

If the degree isn’t too many to type out, you could do:

```auto
TABLE
WHERE
	contains(superior_places, [[]])
	OR contains(superior_places.superior_places, [[]])
	OR contains(superior_places.superior_places.superior_places, [[]])
	OR contains(superior_places.superior_places.superior_places.superior_places, [[]])

```

That assumes `superior_places` is a text or list property whose value(s) is a link to a note (or null).

If some of the `superior_places` values within the chain are any regular text (instead of a link to a note), I think this will manually type-safe it:

```dataview
TABLE
WHERE
	contains(superior_places, [[]])
	OR contains(link(superior_places).superior_places, [[]])
	OR contains(link(link(superior_places).superior_places).superior_places, [[]])
	OR contains(link(link(link(superior_places).superior_places).superior_places).superior_places, [[]])

```

Mind (and please forgive) any typed-on-mobile typos.

If you’re looking to reach more degrees than you’re will to type out, you might want to turn to DataviewJS or Bases, which have functions to reduce the repetition. (Dataview might too, though I don’t recall offhand.)

---

<div class="post-metadata">

**Author:** ![Falkvard](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/f/47e85d/32.png) [@Falkvard](https://forum.obsidian.md/u/Falkvard)\
**Post date:** [August 3, 2026, 6:22am UTC](https://forum.obsidian.md/t/dataview-query-files-that-link-to-a-file-that-links-to-this-file-using-property-links/116792/3 "2026-08-03T06:22:42Z")

</div>

Works perfectly, thanks.

---

<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:** [August 31, 2026, 6:23am UTC](https://forum.obsidian.md/t/dataview-query-files-that-link-to-a-file-that-links-to-this-file-using-property-links/116792/4 "2026-08-31T06:23:19Z")

</div>

Closed on August 31, 2026, 6:23am UTC

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