How to have several sources under "from" in dataview

Things I have tried

I searched online and tried several options myself, e.g. from: “folder name” AND “folder name 2”

What I’m trying to do

You will probably notice from this question that I am not a coder :slight_smile:
I would like to have a clean list of all topics that (a) have a certain tag and that is (b) consolidated from all folders, not just one. I solved a, but I did not solve b. This is how it looks like for a and it works. How can I’ve several “from”?


This reads as I want any single file which (both) are in the “folder name” folder and in the “folder name 2” folder. Being that a file only resides in one folder, this will return nothing, as you’ve seen.

Try changing it into FROM "countries" OR "states", or whatever you want your second folder to be. Now it reads as I want any single file which are in (either) the folder “countries” or in the folder “states”

Bonus tip: Instead of copying the query as an image, type something like the following:

list without id item.text
from "countries" and "states"
flatten file.lists as item
where contains(item.tags, "#check/gayan")

This gives us the possibility to copy (and potentially test) your query.

1 Like

Thank you SO much - also for the bonus tip & explanation! That solved it and I definitely learned something :heart_eyes:

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