JackGruber / joplin-plugin-note-overview

A note overview is created based on the search and the specified fields.
MIT License
77 stars 13 forks source link

"undefined" title of notes. #40

Closed Klemet closed 2 years ago

Klemet commented 2 years ago

Hello there !

Thank you for your wonderful plugin; I think it adds a lot of functionality to Joplin !

I've been having a small issue, however; I wanted to display the notes returned by the search as a list, with their name, and their body in details tags. However, the title of the note is always giving the mention "undefined".

For example, here is the code for the search: image

And here is what is returned: image

Would you have a pointer on how to solve this ?

JackGruber commented 2 years ago

please specify all fields that you use in fields.

Klemet commented 2 years ago

Thanks a lot, @JackGruber ! I'm really sorry that I didn't properly read the sentence explaining it in the README. I should have taken more time to read it.

Just out of curiosity, is there a reason why the example in the README just below this sentence doesn't show both fields used being declared in the fields argument (on this line) ?

JackGruber commented 2 years ago

The virtual fields like notebook are a litte bit special. Since these do not come directly from the Joplin notes table, they do not follow this rule. Therefore, these fields can be used without naming in fields, since they do not need to be loaded first.

Klemet commented 2 years ago

That's really cool ! I'm really amazed by the capabilities of the plugin 😄

Thank you for your patience, and have a nice day !