I have been going through and annotating all my notes and creating different views with Dataview. This is all going very well. A big part of this is or course coming up with metadata. I have now assigned a ton of these, such as giving each note a note type, and devising other fields to further specify properties of that type, like location, people involved, etc.
It occurred to me that it would be handy to be able to generate lists of all the values currently in use for a given field, like being able to list all locations I have put in the locations field, or all people mentioned throughout all notes. Essentially like running some kind of
uniq on the list of values that have been used in a given field. I may just be using the wrong plugin for the job, but the documentation is pretty dense; I’m not sure if it is not there, or if I just can’t find it.
Unfortunately not much. I have come close by making a table containing the field and then sorting by value, but that lists every single file that has the field, not just a list of the values. I have been over and over the Dataview documentation, and can’t see anything that seems like it could possibly be used to generate lists like this. Whenever I search, the results don’t seem even close to what I’m trying to do.
List all values of a metadata field that currently exist in a set of files.
For example, if I had the following notes with a location field with these assigned values:
note1: location: [ Los Angeles , California ]
note2: location: [ Paris , France ]
note3: location: [ Paris , France ]
I could get the following lists by city, state/country or both:
- Los Angeles
- Los Angeles
Or better still:
- Los Angeles, California
- Paris, France
Can this be done in Dataview? If not, any suggestions on how I could do this?