Dataview and new properties view seem to be conflicting

What I’m trying to do

I’m not sure if this is a conflict between dataview and the new properties, or if I am doing somthing wrong, but some of my queires no logner seem to be working.

Things I have tried

I have front matter like this:

attorneys: 
 - Bob Smith

I am using a query like this:

list
from "TCPA/98 - Entities of Interest" 
where contains(attorneys,  "Bob Smith")

First, that query stopped working just in general, and I can’t figure out why. since they improved the properties, it would be nice to change the attorneys field to something like [[Bob Smith]], which seems like should work with that same query, but doesn’t.

1 Like

FYI your query worked for me. My field is a List field and I copied your example, and it worked.

Can you anonymize the names/data and post the Markdown?

It might be a simple syntax issue. Perhaps something that was coincidentally rendering properly, but became more strict in an update. It might be as simple as needing a line break between some element(s), or something.

I think it is related to this, dataview inlinks and outlinks don’t contain links that are specified in the frontmatter. Not yet at least.

2 Likes

Syntax? The release notes show internal links needing double speech marks and double square brackets:

Internal Links

Internal links can be added to frontmatter using the following syntax:

---
link: "[[Link]]"
linklist:
  - "[[Link]]"
  - "[[Link2]]"
---

Has links in the frontmatter ever been shown as outgoing links? In previous versions hasn’t that been one of main things that they’ve not been recognised as links?

Yes, through some cleverness dataview queries can treat them as a links. And (maybe?) Yes, the frontmatter link plugin allowed some changes related to links to be propagated into the frontmatter again.

But in the pure non-plugin version, has links in the frontmatter ever been recognised and treated as links?

So in my world, not seeing the newest version, what’s happening is that the core obsidian is enforcing a stricter validation on the frontmatter, disallowing some random styles on writing something resembling links, which in turn will/could allow for proper treatment of links in the frontmatter (somewhere?) in the future.

The new obsidian version with the property feature, registers frontmatter links in the outgoing links and backlinks of the obsidian core plugin. But it is not yet picked up by the plug-in Dataview, in the inlinks and outlinks. I assume it will be added once the property feature is released on all platforms.

over on the github this was also reported, and the last I read it there didn’t seem to be any indication from the owner that it would be address because he was working on a different plugin.

facing the exact same issue here

curious if anyone has found some workaround

Hello,

I think I have the same issue. I am relating mine here, so this issue may gain some traction and to ask whether you could perhaps think of a workaround.

My issue

For my notes on events, I want to add a list of related organizations in the frontmatter as links to their respective notes. See example below for how the link to the note “WissKlub” has been added in new updated properties system in the frontmatter in a note on an event.

---
tags:
  - Event
aliases: []
EventDate: 
Location: []
Person: []
Organization:
  - "[[WissKlub]]"
---

On the note called “WissKlub”, I am then using dataview queries that check all the inlinks and outlinks of the notes with the tag “Event” whether they contain the link to “WissKlub”. This shows me all the event notes connected to the note “WissKlub”. This is perhaps not the most stringent way of doing it but it is very flexible. See below.

dataview
TABLE WITHOUT ID file.link AS Events, Person AS People, Organization, EventDate AS Date, Location
FROM ""
WHERE contains(Tags, "Event") AND (contains(file.outlinks, this.file.link) OR contains(file.inlinks, this.file.link))
SORT EventDate ASC

However, this query above does not recognize the value “[[WissKlub]]” in the list for the property “Organization”. Therefore, my query does not pick up the event note with the frontmatter I posted at the top of this post.

Two interesting observations

First, in the otherwise still empty event note with the frontmatter at the top of this post, the prompt = this.file.outlinks gives me back <empty list>; i.e. it has the same problem as the posts above describe. However, the panel for outlinks in the Obsidian interface panel for outgoing links does show me the outlink to the note called “WissKlub” based on the link in the frontmatter property. See image below.
grafik

Second and conversely, in the note called “WissKlub” the prompt = this.file.inlinks also does not show me the event note in question. However, the Obsidian panel for incoming links does show me the event note. See yellow marking in the image below.
grafik

This I find strange because on the one hand, it does recognize the links in the frontmatter properties as inlinks and outlinks in the panels but on the other hand it does not for the queries. :-/

What I tried

I tried to add another condition to the “WHERE” command of the query to pick up on the new “Organization” property. However, none of them have worked so far. E.g. I tried adding ... OR contains(Organization, this.file.link) and variations of it, but this again does not pick up on the “Organization” property, which in my case is defined as a list. I am not that familiar with these queries and I could not find any solution on my own.

Could anyone help me with that?
Is there a function like contains() that can check if a link is contained in a list property? Or is the issue here that the links in the property are stored with double quotes around them like "[[WissKlub]]"?

Thank you very much!

1 Like

Everything related to the Property feature within obsidian is working, including outgoing and backlinks.
But… the Dataview plug-in, which is from another dev, is not (yet) working correctly with that new Property feature. No matter how hard you try, the inlinks and outlinks don’t contain links from the frontmatter.
The only thing you can do is to report this issue at the devs of Dataview, hopefully the more reports they get the sooner it gets fixed.

1 Like

Ah, I see, now I understand the issue. Thank you! I’ll report the issue to the Dataview devs.

Anyone found a workaround for this yet? It is very annoying

1 Like

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