mdelobelle / metadatamenu

For data management enthusiasts : type and manage the metadata of your notes.
https://mdelobelle.github.io/metadatamenu
MIT License
478 stars 27 forks source link

Q: Unique lookup values #596

Closed arminta7 closed 4 months ago

arminta7 commented 4 months ago

Hello!

I was wondering if you could help me with a lookup. I want to show the unique quarters that are associated with related days. Right now I only know how to show the quarter for each which gives me a lot of repeat values. How can I only show the unique values?

Thank you!

Screenshot 2024-02-18 at 19 28 43 Screenshot 2024-02-18 at 19 28 59
WhiskeyJack96 commented 4 months ago

If you use a custom summarizing function you could apply more logic to the pages

return [...(new Map(pages.map(x => [x.quarter.path, x.quarter])).values())]
image
arminta7 commented 4 months ago

Hello! I tried your solution and this is what I got. Not quite working!

Screenshot 2024-02-21 at 17 31 56
WhiskeyJack96 commented 4 months ago

Can you share a couple example note yaml sections and/or the property config?

arminta7 commented 4 months ago

Is this what you mean?

Screenshot 2024-02-22 at 13 55 27 Screenshot 2024-02-22 at 13 52 50 Screenshot 2024-02-22 at 13 53 17
WhiskeyJack96 commented 4 months ago

With these notes in the root of my vault:

March.md W1.md W2.md

and this fileclass defined: testissue.md

I get the desired behavior, but I'm not sure I have the notes set up quite the same as you 😅