Icon shows outgoing reference, inspector and script don't?

I’m probably a bit dense, so please forgive me. The icons for the highlighted record (ghettobienale.org) seem to show outgoing and incoming links. However, the inspector only shows an incoming one, similarly to my scripting attempts: One incoming, none outgoing.

There is, however, a highlighted word in the PDF – but that should be (and is) marked by the third icon.

What am I misunderstanding?

The item has an annotation (see Annotations & Reminder inspector), that’s the outgoing reference. But the Links inspector uses only PDF link annotations. And the third icon actually marks items with an annotation, not items with PDF annotations.

So, an annotation is itself and an outgoing reference? Even if it doesn’t “go” anywhere (here, it’s only a text note).

But then, if it’s an outgoing reference, shouldn’t it also appear in the outgoingReferences element of the record? I.e, shouldn’t
db.getRecordWithUuid(...).outgoingReferences().length
return 1 instead of 0?

What kind of annotation - a PDF annotation or an annotation created via Annotations & Reminder inspector?

That one. I wouldn’t even know how to use the inspector for that :frowning:

But according to the icon the item has a generic annotation created via Tools > Inspectors > Annotations & Reminder or via AppleScript. And that’s the outgoing reference, the PDF annotations don’t matter.

You’re certainly right. OTOH: Why does the outgoingReferences property/elements than not include this reference? While the list view shows one outgoing and one incoming reference.

And why does the annotation show up as an annotation and a “outgoing link” icon?

Most likely the referenced annotation was deleted or is in a closed database, the icon just marks the existence of outgoing references.

The annotation is an item on its own and both are linked.

Would it be conceivable that the “outgoing reference” points to an annotation record (i.e. in the “Annotations” group in the same database) that is now gone? Because the group is still there, but empty – so I may well have deleted this document at some time.

In that case, the “outgoing link” item and the “outgoing references” column in the inspector would refer to this deleted record. And the script wouldn’t find the entry because it’s deleted.

Which still looks like a little bit inconsistent (inspector shows outgoing references, API doesn’t).

That’s actually one of two options I described above and the most likely one.