Problems creating (many-to-many) relations using x-devonthink-item links

I’m trying to use the Incoming Links feature to create links between documents, but it seems that there are some limitations(?) to indexing links:

  • Links are not indexed in .eml files
  • Links are not indexed in multi-line text custom meta data fields

I’m looking into using custom meta data, but can only see two options:

  • Create multiple ‘linkN’ item link custom meta data fields (feels rather hacky - and unnecessarily limits the number of links I can create)
  • Use Rich Text custom meta data fields. Links in RTF are indexed (creating Incoming Links) but cannot be read using Applescript: it returns a <<data>> class - rather than RTF) (you acutally can, see next post). Also - updating RTF is notoriously difficult.

It would be very helpful if item links would be indexed in .eml files - negating some of my need for this: Incoming links not recognized from e-mails? - #3 by mdbraber (hopefully @cgrunenberg will be able to comment on this). If that isn’t possible - what would be my best alternative?

Some relevant links:

@silverstone seems to have run into similar issues - maybe he has some suggestions?

Adding to my own question: it is possible to retrieve the RTF data from a custom meta data field “Test” like this:

tell application id "DNtp"
	repeat with theRecord in (selection as list)
		set contentAsRTF to get custom meta data for "Test" from theRecord
		set resultRecord to create record with {name:"Test", type:rtf, rich text:""} in (parent 1 of theRecord)
		set data of resultRecord to contentAsRTF
	end repeat
end tell

This still doesn’t make it easy to process RTF, but it’s at least technically possible

Supporting this is probably the easiest to implement approach.

1 Like

And the next release will support this, databases already using this might have to be rebuilt though.

Thanks! I’ll wait implementing my approach until the next release!

An additional question: will links be clickable just as with the uocoming change in the Markdown edit window / box?

Data detectors might support this but I didn’t test this yet.