Included notes in reports

I would like to produce a report which includes notes included using the command

{{include:A Second Note to be Included}}

Is this possible?

The include command only works within a chunk of Markdown – typically, the body of a note – and so it allows you to include one Note within another Note. So any report that includes that Note should also have the other Notes included. But maybe tell me a bit more about what you’re trying to accomplish, from a big picture perspective…?

I am trying to create a markdown report from a set of markdown notes. Each note corresponds to a block of the report. The markdown document which I get from concatenating the individual blocks, I then pass through pandoc to produce a pdf (through LaTeX). I was able to do this successfully - generate a markdown report which compiles all the individual markdown files. I first generated a report sample in markdown and was then able to edit that template to get the desired result. The output didn’t get properly written to a file in the reports folder, but I could just save the contents of the query output window to a markdown file.
I was then experimenting with doing more sophisticated versions of this - so I would like to filter some of the documents and change the ordering etc. One way to get an arbitrary sequence of blocks is by using the include command. I would like to export the resulting markdown which embeds all of the included markdown notes, but when I try to do this using the same procedure as before with a simple template, the query output window doesn’t replace the include commands with the embedded files, but prints the commands as is.
I can attach a minimal set of notes that reproduces this problem if that would help.

Yes, the {{include}} command you’re using is part of the Markdown parser, and so this command only gets invoked when converting the Markdown to HTML. Can you use the HTML for your purposes? Or do you have to have the Markdown files?

My other thought would be to add a Status field to your Notes, and then create a report that only selects the notes with a certain status. You can then create a report that includes the body of each note (or whatever fields you want) in the output, without conversion to HTML. (To be clear, this approach would not make use of any include commands.)

BTW, welcome to the Notenik Discourse forum! Glad to have you here!

Thanks. I needed embedded markdown for two reports. For one of them, the Status field idea worked out and for the other, I was able to use another app which supports transclusion. Thanks a lot for making this extraordinarily useful app and for the extensive documentation!

1 Like

Glad you found it helpful! Feel free to spread the word via app reviews, etc.