You’re welcome! I asked how much you understood because posting the adjusted script in full seemed at bit much, but I wasn’t sure if posting a snippet was enough. Great that you could make it work. ![]()
The category list + dialog I shared earlier stores your choice as a text string in the variable theCategory. You can use that wherever you want. In the example I use it to immediately create the variable noteCategory holding the text string [Category] (space included) for use in the item name. I just felt that was cleaner to read.
If you want it in the H1 of the note, this will do:
-- Create linked note
set theMarkdown to "# [" & theName & noteCategory & "](" & theLink & ")" & return & return
If you want it in the H1 – but not as part of the link – do this:
-- Create linked note
set theMarkdown to "# [" & theName & "](" & theLink & ")" & " \\[" & theCategory & "\\]" & return & return
(Notice that I’m escaping the brackets. If you end a header with [Some text] in multimarkdown, the bracketed text does not render because it is interpreted as a custom id attribute for the header.)
Or if you want it as a H2 under the image, you could go for this (this time without brackets):
-- Create linked note
set theMarkdown to "# [" & theName & "](" & theLink & ")" & return & return
if type of theRecord = picture then -- Add image link:
set imgLink to "" & return & return
set theMarkdown to (theMarkdown & imgLink & "## " & theCategory & return & return)
end if
set newNote to create record with ...
Or as a tag:
set newNote to create record with {..., tags:theCategory}
BLUEFROGs script distinguishes between images and other records, and the “Transclusion” comment specifically concerns the records that are not images
(Transclusion is in this context a feature of multimarkdown that lets you render one document as part of another using the {{ }} syntax. Image links already do that for images, transclusion is mainly useful for other text files.)
Regarding custom metadata, I simply wasn’t sure if I had understood you and wanted to point out that it has many uses besided See Also & Classify. It all depends on what you’re trying to do, of course.