Wish list: add ability to insert item hierarchy (or a script to do so)

DevonThink 3.7.2, Catalina latest version

Hello,

In Finder or Pathfinder, when I create new documents I usually write the top of document “file location” where I insert the unix path of the document, so that anyone reading the printed version can easily locate the document, or that I can locate that document if I copy pasted it into another app or sent it by email.

It would be nice to have the equivalent for DevonThink items. The item link itself is cryptic and does not give any clue as to the item location.

For example, when I create an RTF(D) item, I would like to be able to be able to “insert item hierarchy” at the beginning of the note.

Assuming that I am creating a RTFD note about new razors, I would like to insert at the top of the item
Database Inbox
Hierarchy Shopping → Household → Razors → new razor review 2021
Note that the database is inbox, Shopping, Household, Razors are folders and new razor review 2021 is the title of the item.

A solution would also perhaps be to create a script to do so.

thanks in advance for your time and help

A basic solution would be to create a new document and to insert the placeholders for database & group name via the contextual menu like this for example:

Database: %databaseName%, Group: %groupName%

Finally export this document as a template (see File > Export). NOTE: Placeholders which require the not yet existing item (e.g. %recordLocation%) do not work in this case.

1 Like

Thank you Christian. I like Placeholders because it gives me flexibility but still have problems.

Below is the group hierarchy, placeholders and resulting text after save as template → new from template

I have 2 problems

1- is there any way using placeholders to display the complete hierarchy Test0→ test1→ test2→ test3→ item ?

2- the placeholders do not “adapt” when I move an item. How do I manage this ?

thanks again very much Christian

2021-07-06_11-04-51

Not without a script.

The only possibility would be to use a smart rule which executes a script and updates your document accordingly.

1 Like

thank you Christian

Actually, this is a situation where a triggered script could still be useful, IMHO.

1 Like

Triggered scripts are only executed after opening/selecting items, therefore e.g. after moving an item the location wouldn’t be updated.

1 Like

True. But if the file was being used in DEVONthink, the triggered script would modify it.

1 Like

fwiw The hierarchy can be viewed in the information panel

I would like to insert at the top of the item

As you posted, I’d use a script to retrieve and paste the information

1 Like

thank you for your comment. Since I don’t know scripts, I was trying OCR of the information panel but the resulting text is full of garbage characters.

You’re definitely going to need a script to accomplish this, especially if you want it to update after moving it.

1 Like