What I’m trying to do
I want to have a dataview table of a couple random files sourced from a tag displayed in the footer of my daily note, so I can review vocabulary words. I want to filter by status to exclude vocab I’ve already learned, eg state: “not learned”.
Things I have tried
This creates a table of three random files, but it seems to refresh the results when I interact with the document.
[!EXAMPLE]+ Random Vocab
const shuffled = dv.pages('#resources/vocab') .sort(() => 0.5 - Math.random()); let selected = shuffled.slice(0, 3); dv.table(["File", "State", "Definition"], selected .map(b => [b.file.link, b.state, b.definition]))
I’ve also been unable to figure out how to filter by state. I think I probably need to include something like the following, but I’m not sure where:
.where(b => b.state.text.includes(“not learned”))