mdelobelle / metadatamenu

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

Lookup customListFunction breaks render #681

Open snelling-a opened 4 months ago

snelling-a commented 4 months ago

Hello,

Firstly, thank you for this plugin. It's a really great idea and I'm finding it very useful.

I am have a little problem with Lookups though. in my daily_notes class, i have this Lookup:

  - name: test
    type: Lookup
    options:
      autoUpdate: true
      dvQueryString: dv.pages('"art_culture/music/album_of_the_day"')
      targetFieldName: date
      outputType: LinksList
      builtinSummarizingFunction: Count
      summarizedFieldName: ""
      customListFunction: page.file.name
      customSummarizingFunction: return pages.length
    path: ""

and it works great Screenshot 2024-05-20 at 11 45 13

however, i would really like to see the page.title instead of the full path

  - name: test
    type: Lookup
    options:
      autoUpdate: true
      dvQueryString: dv.pages('"art_culture/music/album_of_the_day"')
      targetFieldName: date
      outputType: CustomList # change here
      builtinSummarizingFunction: Count
      summarizedFieldName: ""
      customListFunction: page.title # change here
      customSummarizingFunction: return pages.length
    path: ""

and now, in the note, i see:

Screenshot 2024-05-20 at 11 48 06

and on the options modal i see:

Screenshot 2024-05-20 at 11 48 32

i have even tried just returning a string and it is the same result

      customListFunction: "'test'"