Placeholders not working?

Hi all,

This seems to be a simple question - and I’ve looked through the forum but I can’t find specifically my problem. I think it’s very trivial.

I want to make a template using placeholders. I add a placeholder in the markdown-document through the suggested menu - right click → insert placeholder (e.g. %name%). I then add this document to the templates, export → add as template. However, when I then open the template, it still displays %name% instead of the actual name. The same goes for other placeholders. I am viewing the document in markdown.

When I try to open pre-made templates from DevonThink itself - the placeholders show perfectly fine, e.g. the actual name of the document or date etc, instead of %name% or %date%.

I searched through the forum but I can’t seem to find why my template doesn’t work. It would greatly improve my workflow though. Is it possible what I want - and does anyone have any indication why this doesn’t work?

Please see attached an example. The pre-made template fills in the placeholders. However, I try to add my own placeholders as well %recordpagecount% or %groupname%, but these don’t convert to the actual text itself. The same goes for all other placeholders I try to add.

Scherm­afbeelding 2023-10-24 om 21.04.02

Many thanks!

Placeholders that require existing records/items are not supported in templates as the record/item does not yet exist. These placeholders are only suitable for e.g. smart rules, batch processing and imprinting currently.

Thanks for the quick response.

I understand now that the “record”-placeholders can’t be used. Is there somewhere an explanation how these could be used for smart rules, and batch processing? Would love to learn about that!

I am also wondering - if “record”-tags will not update in templates or files, what is the point to be able to add them ‘through right click → insert placeholder’ if they will never convert to the actual name/tag/URL/kind etc?

Or is there something I am missing why it is still useful to add the “%record[…]” tags in a file?

The Automation chapter in the built-in Help and manual.

what is the point to be able to add them ‘through right click → insert placeholder’ if they will never convert to the actual name/tag/URL/kind etc?

Because they are used in annotation file templates. It would pick up the tags of the referring document.

The annotation file template uses the %recordTags% and %recordHashTags% placeholders…

1 Like

Many thanks! This makes sense. I will play some with the annotation files to see how to make use of the placeholders.

1 Like