Only return unique values in dataview query? #261
Replies: 3 comments
-
Hi! you can use this method to have unique values in your select: |
Beta Was this translation helpful? Give feedback.
-
That doesn't seem to work, unfortunately. Just returned an empty list. |
Beta Was this translation helpful? Give feedback.
-
Do you see any error in the console? Can you try alternatively the dataviewjs data array method |
Beta Was this translation helpful? Give feedback.
-
I love that you can use a dataview query to populate a field's options, but the one issue I'm running into is that when I wrote my query:
dv.pages('#Novel/BookTitle/Character').map(p => p.role)
... It outputted every character's role value rather than a condensed list of the unique roles to choose from. Screenshot:
Is there any way to adjust the DV query to return only unique values, and if not, it would be amazing if it could be added as an option in the future!
Beta Was this translation helpful? Give feedback.
All reactions