Links between documents?

Only the contents matter, therefore the only possibility would be to script this. But this could be quite slow in case of large or many databases.

I’m baffled by that fact that DT is not capable of doing such a simple operation as (manually) linking two database entries to each other. And when people bring this up as a problem they are told to jump through all kinds of hoops and use third party apps as a workaround. What am I misunderstanding here?

Here is a very basic use case: Let’s say there are two documents in your DT database: a letter and a letter replying to that letter. Doesn’t it make sense to create a link between these two documents (regardless of whether they are images, emails, pdfs, word-documents or anything else) so that when you look at either one of these, you see that there is an explicitly related document? And DT requires me to create a label that will be used for nothing else than linking these two documents? Or instead, I can annotate the document and insert a link into the document itself?

Apparently, the functionality is already there, but only for “compatible documents”. It states in the DY-documentation under “Document linking”:

Drag and Drop: You can Option-Command-drag and drop a file into a compatible document to insert an item link.

Why do you need a “compatible document”? Is it because also this method edits the file, writing the link into the file? But why? Why can’t we create a link between two items at the database level? Isn’t that the idea of relational databases?

Sorry, but I’m lost. Can someone help me make sense of this?

3 Likes

DEVONthink 3 added custom metadata, which you can use to do what you’re talking about. Add a new field for links like you’re describing in Preferences → Data, then in any record’s data inspector, select the custom tab, then choose the file you want to link to in the newly-added field. See the Metadata section of DEVONthink’s Help (Help → DEVONthink 3 Help → browse to Appendix → Metadata, or search for Custom Metadata).

1 Like

Adding to this: Custom metadata is a feature of the Pro or Server editions.

1 Like

As others mentioned, there’s custom metadata to store the link
Also, all records also have a Finder Comments field that can be used

a letter and a letter replying to that letter

I select the records and create a group (an icon on my customized toolbar)

1 Like

@BLUEFROG
I’m confused too.
When can one add a link to a pdf document?

I have 3 pdfs in the item window. Each of them supports RightClick → Copy Item Link. However, only one of them allows me to RightClick->Add Link … The other two do not display that option. All three PDF items allow markup

  • Why is that?
  • How to I fix that? (so that I can add an link to any PDF in the DB?)
1 Like

What was selected in case of the failing documents and which version of macOS and DEVONthink do you use?

DT 3 Pro
MacOS 12.0.1

select a small set of PDF documents with a common tag (for example: author name and subject)

  1. RightClick->Copy Item Link on source document (PDF) in the view panel.
  2. Select target document (PDF) in view panel to open it.
  3. Followed by a RightClick on the document in the preview panel or in the separate viewer.
  4. Success: Contextual menu includes a triple(Highlight, Add Link…, and Link To)
  5. Failure: Contextual menu does not include the triple

And what’s selected in the document in case of failure?

Nothing is selected in either case (Success or Failure). I’m trying to link documents, not a specific phrase.

I see, your hint helped. If I move the cursor over some of the text in the target document, the RightClick works. If the cursor is over the margin or a blank area it fails.

The document was OCR’ed by either DT3 engine or the PDFPen Pro engine.

These three commands require indeed a text selection, right/control-clicking on text might automatically select it if there’s no selection yet and that’s why it fails in case of a click on a blank area.

Thank you for clarifying that. It appears that a RightClick automatically tries to select text when I do that. I thought that was due to my hand motion.

1 Like

It seems strange to me that after all this time there is still not a many to many link feature. People have suggested custom metadata, but that doesn’t cut it. It does provide a custom link field but this only lets you link to one document. This would not scale well with multiple links.

All you would need is an expandable table of item links. It would also be good if these links could be bidirectional, but that is not required.

If anyone has any other solutions, please let me know. Keeping a separate file to link other files is not an option I would like to use.

A custom metadata multi-line text field would work based on what I understand of your use case.

image

2 Likes

Thank you for the help. While this kind of works, I don’t think multi-line test is really a substitute for the real thing. Devonthink does not register any of those links like it would a URL or item link. I need to manually highlight each link, right click and open in a different window.

By the way, how did you get a new line? Whenever I press enter all it does is select all the text in the multiline box.

Many to many links should be a headlining feature. It is an amazing way to organise files and enables a very clean database as apposed to grouping with a replicant.

Popclip can execute the links in one click

Keyboard Maestro can convert Enter to Ctrl-Enter automatically

I can check the exact macros to do the above later if desired - it works well

In the next release you’ll be able just to click them as regular links: Recognize links in Markdown WYSIWYG editor - #8 by cgrunenberg

I can’t oversee what that would mean in terms of the underlying design of DT, but I can say that having a multi-select item (which would translate to a list) in custom meta data would enable a lot of interesting use cases. I’m suspecting though that metadata items which are basically lists are complex to implement, because e.g. you can’t just use simple search parameters like “contains” etc, so it would need different handling. But I think @cgrunenberg is the only one in a position to comment on that.

For other readers: AFAIK not by default. See Make PopClip open x-devonthink links

I would love to see an internal functionality that is something like Hook can do. e.g., dragging an item on another, perhaps invoking a modifier key, would link the documents and this would appear in link pane of each document (bidirectional). And create as many as needed. Is this feasible?

2 Likes