Dataview: select field to show in table

I have a set of inputs notes containing various inline dataview field called “quote::”

In an extra note I want to recover all quotes that mention a term (SEARCH TERM) so that I can have all of them in one single dataview table.

I tried this coding:

table WITHOUT ID, quote
from “INPUTS”
where contains(quote, “term”)

PROBLEM is that it is enough to have a note containing one “quote::” with the SEARCH TERM and I get in the dataview table all "quote::"s of that note, even those which do not contain the SEARCH TERM.

Is there a way to de-select all other "quote::"s in the dataview table?

Hi.
To simplify an eventual answer, you’re not interested in the file.link?
You want only a list of quotes without any link to the source note? (because you use TABLE WITHOUT ID and only one column declaration quote)

Right. I just need the quotes containing the search team appearing in the Dataview table.

If only the quotes, try something like this (adapt to the wanted “term”)

TABLE WITHOUT ID Q AS Quotes
FROM "INPUTS"
WHERE quote
WHERE contains(quote, "term")
FLATTEN quote AS Q
WHERE contains(Q, "term")

Mmh, it seems that it is not working as expected.

This is my dataview table (which is not showing any result in Preview):



And this is the note where the quote is:

Does removing these two lines give a result?

Nope :pensive:

That’s a bummer.

Are you sure all the necessary plugin settings are on?

TABLE WITHOUT ID quote AS "Quotes" 
FROM "INPUTS"  
Where quote
WHERE contains(quote, "term") 

try this

You can also do this

TABLE WITHOUT ID Q AS "Quotes" 
FROM ""  
Where quote
WHERE contains(quote, "term") 
FLATTEN quote AS Q
WHERE contains(Q,"term")

Although, I don’t see any difference.

Neither of them work. That’s a pain!

Dataview Plugin is on. What else do I need?

Restart obsidian.
In one note with quote field, write this inline query:

`=this.quote`

If you get your quotes in that note, then the query should work.

Edit: and if you don’t define the source, you can remove FROM ""

1 Like

Oh yes!!! Now it works! It was sufficient to restart Obsidian. I am so dumb…

Thank you guys for helping me!

1 Like

Apropos absolutely nothing, where does the quote come from?

From Adam Smith’s Theory of Moral Sentiments :smile:

1 Like

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