Querying Multiple Backlinks in a field

Hi,

I’ve seen this post about querying backlinks in Dataview and it works perfectly -

TABLE category, topic
FROM #book
WHERE category = [[02 MOC-PROGRAMMING]]

However, how do I query a note with multiple categories -
e.g. category:: [[02 MOC-PROGRAMMING]] [[03 MOC-SOMETHINGELSE]]

So, let’s say I’m trying to write a query to find all notes with [[03 MOC-SOMETHINGELSE]]

I’ve tried contains function, but no joy…

Thanks in advance for any help offered!

inline fields: multiple values

The right syntax to use multiples values in inline query is:

key:: "value 1", "value 2"

But if values are links or tags you can also use this:

key:: [[note 1]], [[note 2]]

So, you need to use at least this syntax:

category:: [[02 MOC-PROGRAMMING]], [[03 MOC-SOMETHINGELSE]]

query

When multiple values in a field you need to use contains() to target one specific value in the list/array.

TABLE category, topic
FROM #book
WHERE contains(category, [[02 MOC-PROGRAMMING]])

Worked a charm. Thanks!

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