How to create a dataview table that collects inline fields whose keys satisfy some criteria?

What I’m trying to do

I often use dataview, with inline fields, to write down questions in my notes, so that I can collect them later with a table, and link back to the context in which I asked them.

For example, I might have (in several different files):

[topology_question::When can a set be both open and closed?]

and then in a separate file, like topology_questions.md, the table:

TABLE topology_question as "open question"
WHERE topology_question

and this mostly works, producing a table with links to the places in the files where I asked the question.

However, here’s what I’m trying to do: I actually have many inline fields like this, of the form *_question. E.g., topology_question, abstract_algebra_question, etc.

As a first step, I’d like to create a table that can search for inline data keys using a wild card, that would list all inline fields ending in “_question”.

Things I have tried

Naively, I tried:

TABLE subject_question as "open question"
WHERE contains(subject_question, "_question")

but this gives “Dataview: No results to show for table query.”

I’ve gone through the dataview documentation a bit now but I can’t figure this one out. It seems so doable though! Is there an easy solution I’m missing?

thanks.

Using custom checkboxes, as offered by the Minimal theme and others, I would rather do something like:

- [?] (topic:: topology) When can a set be both open and closed?
- [?] (topic:: abstract_algebra) What is really a real number?

Which render as this using minimal theme:
image

If you want, you could also rather easily format the inline field according to your preferences. If you use [topic:: topology], you could even target just these inline fields.

Given markup like the above you could use TASK queries to list your questions, and easily select only those belonging to a given topic or not. You could also do summation queries based on file.tasks (and variants), to gather up which topics you’ve got, and how many question in each, and so on.

And since now your question are tasks, they can have a link back to the original location given that you’re using a TASK query to list them. You could also implement schemes where sublists could provide solution/suggestions on each question, and access these using the children of a given task.


NB: For more on custom checkboxes, see

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