My dataview query originally worked, and now doesn't. What did I mess up?

What I’m trying to do

I’m trying to use dataview queries inside collapsible callouts to create an automatic index for a world-building bible.

The first time I ran a query, it worked. When I copied that query exactly except for changing the subject, that query and all future queries didn’t work. When I made a change to properties to try to solve the problem, even my original query stopped working. Now they all return a message saying no results found.

Things I have tried

Here is my callout and query:

[!example]- History

FROM "Story Bible"
WHERE Subject = "History"

In the applicable files, under properties, the subject (list type) is History.

Am I missing something obvious or do I need to debug something?

Thank you :slight_smile:

You’ve even written it yourself , by stating its a list type. :slight_smile: But indeed it’s a tricky one when you don’t know about it.

The equal sign is used to compare against a pure text type, a single value. When in the list context you need to use something like contains(Subject, "History").

I say something like because this would also match if your subject was “Modern History” or “History something”. If you want an exact match use econtains(), and if you kn-casd sensitive matching using icontains().

All of these are made for matching against one value of a list.

Thanks! Worked like a charm.

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