Table of in-line fields that ONLY shows entries with specific value for one of the in-line fields

I have a note with the guestlist for an event and I want to use Dataview to keep track of who has accepted the invitation, dietary needs etc.

I have all of the invited guests in a numbered list with inline fields for all of that data.

Example:

  1. (name:: John Doe) [accepted:: Yes] [diet:: ] [traveltime:: 1hr]
  2. (name:: Jane Doe) [accepted:: ] [diet:: Vegan] [traveltime:: 2hrs]
    etc.

I managed to create a table that lists all of the guests and their data:

TABLE WITHOUT ID name AS "Who?", accepted AS "Present?", diet AS "Dietary needs", traveltime AS "Travel time"
FROM "nameOfNote"

However, I would also like to create a table that only shows the people that have accepted the invitation and all the data for these people. (so where ‘accepted’ = ‘Yes’)

But I can’t get it to work and can’t find an example of how to do this. I am very new to Dataview and only have a very basic understanding of code, so if someone could help me out and explain to me how it works so I can learn from it I would very much appreciate it!

This should do the trick:

```dataview
TABLE WITHOUT ID L.name AS "Who?", L.accepted AS "Present?", L.diet AS "Dietary needs", L.traveltime AS "Travel time"
FROM "Testen 4"
FLATTEN file.lists AS L
WHERE L.accepted = "Yes"
```

If you’re just getting started with Dataview, it might be worth taking a look at the core plugin Bases. It’s easier to use than Dataview. Since Bases doesn’t support inline key–value pairs, you’d need one note per guest — which might actually be beneficial if you plan to record more detailed information later.

1 Like

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