Translate WHERE line from Dataview Block Query into Dataviewjs Inline Query

Hello everyone. I tried everything to solve it my own but my js knowledge seems to be to limited to understand what is going on. Hope you can help me :slight_smile:

What I’m trying to do

My dataviewjs inline query is supposed to spit out a list of notes that contain a certain link value in their frontmatter.

As a dataview block it works fine and looks like this:

WHERE contains(up, [[Test Note]])

Translated to dataviewjs inline query I get an error message :x: TypeError: p.up.contains is not a function. My code is (to increase readability I split it on multiple lines):

.where(p => p.up.contains(“[[Test Note]]”) )

Things I have tried

I’m sure that the faulty line starts with .where
I studied the Dataview Code Reference up and down but couldn’t find a solution there :slightly_frowning_face:

Any ideas?

Some background information

This issue became important to me after implementing the Dashboard++. There dataviewjs inline queries are used. As I find it easier to create a dataview block, I tried to replace them. BUT subsequently the layout of the dashboard was a mess because the output list items were on the first level instead the expected second level. So, for the case that I won’t get the dataviewjs query working probably I need a solution how to indent the list items of the dataview block query.

:slight_smile: Found a solution and want to share it for the case that anyone else has the same issue:

.where(p => p.up == “Test Note”)

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