Is there a way to see if a note is being linked to by another note?

Thanks for the reply. Sorry for the delay. I went to try your suggestion and realized something else in the process. The apple script file for that (Find Incoming WikiLinks for MD.scpt) included with your book is the earlier version that doesn’t include aliases. As you mention the earlier version and an updated one on p. 257, it would seem that you had intended that script to be the updated one including aliases (right?). So I copied the script from your macro (07. Find Incoming WikiLinks), which does include the aliases and copied and pasted to create a new apple script. Then I finally was able to try your suggestion. But I got the same response error, “Please select a record”. So I copied the script above in this thread edited by @sander2 and created a new apple script file with that and again it works. Well, I guess I will just avoid this macro and run this script manually, as I don’t know enough to figure out the problem.

Along these same lines…the scripts/macros included in your book. More feedback. I have found the reverse situation with regard to the scripts/macros for @Bernardo_V’s Adding incoming back links (Return links/Back links). Both of the macros you set up to run that script 03 (04). Add Back Links to Note - With (or Without) Options work perfectly. But this time the stand alone apple script included in the book returns this for me:

So I copied and pasted the latest version (version of script A.2) (Return links/Back links) into a newly created apple script and ran that as a stand alone and it worked fine.

@kmliebo77 Thanks for letting me know about the discrepancy - I certainly must have updated one and not the other. I’ll add it to a list for an update. I’m sorry you’re having troubles with the scripts - I’ll keep my eye out for the “please select a record” issue and hopefully come up with something.

+1 for the local graph feature. DTP is already offering all the informal semantic relationships – the formal (back-)links would turn it into the most serious Zettelkasten solution out there.

1 Like

In case you’re trying to run the script I posted in this thread you’ll find that it doesn’t work in DEVONthink 3.6. That’s due to DEVONthink’s new handling of “invalide arguments”.

After the release of DEVONthink 3 I decided to continue to use “search window” in scripts so that DEVONthink 2 users could use them in, well, search windows. With version 3.6 that’s not possible anymore.

If you want to use the script you’ll have to replace this voluminous block …

set windowClass to class of window 1
if {viewer window, search window} contains windowClass then
	set currentRecord_s to selection of window 1
else if windowClass = document window then
	set currentRecord_s to content record of window 1 as list
end if

… with this neat line …

set currentRecord_s to selected records

… which does what the six lines have done. Wow, that’s great! :smiley:

Thanks for this explanation. I was always wondering if I was missing something, when I saw this seemingly complex code referring to Windows etc.

1 Like

Hey @pete31. That is awesome and works perfectly. I’m setting up an update to go out tomorrow. Cheers!

1 Like

Does anyone know if this functionality will be added soon to DevonThink? I don’t really want to use Obsidian and if DT added a built-in functionality to see what notes are linked to a specific link — pretty much a more complete back linking structure — that would be great.

DEVONthink 3.8 Documentation, page 35:

INCOMING AND OUTGOING ITEM LINKS Incoming and outgoing links are item links DEVONthink has detected. The two types of links function as sides of one operation. If you create an item link to an image, the file will have an outgoing link detected. The image you have linked to will have an incoming link detected since the file has a link pointing to it.
Documents with incoming or outgoing links will have a special property icon displayed to the right of the filename in the item list. See also p. 214ff . You can display a sortable Incoming Item Links and Outgoing Item Links column in the headers of the item list in List view. There also are incoming and outgoing item link criteria usable in toolbar searches, smart groups, smart rules, and AppleScript.

See the Document > Links section of the Inspectors chapter for information on viewing the links of a document.

Or is that not what you mean?

1 Like

Oh yeah! That looks pretty good to me. I think that should be sufficient for now. Thanks a lot, Blanc.