"lookup records with tags" fails in JavaScript only

This (AppleScript)

tell application id "DNtp"
	lookup records with tags {"Balkone"} in (get database with uuid "0EBFA252-7F46-4AB3-BCAF-B36410685E0B")
end tell

works as expected, returning a non-empty list of records. Whereas this (JavaScript)

const app = Application("DEVONthink 3");
const records = app.lookupRecordsWithTags(['Balkone'], {in: app.getDatabaseWithUuid(`0EBFA252-7F46-4AB3-BCAF-B36410685E0B`});

does not, in that it returns 0 records.
More precisely, Script Editor’s “Events” tab tells me this

app = Application("DEVONthink 3")
  app.getDatabaseWithUuid("0EBFA252-7F46-4AB3-BCAF-B36410685E0B")  
  app.lookupRecordsWithTags([], {in:app.databases.byId(3)})

which is obviously utter nonsense: I’m passing in an array with exactly one element, not an empty array. Something seems to be amiss here, I guess. @cgrunenberg ?

I can only confirm the nonsense, I used an internal build and DEVONthink indeed receives an empty array.

1 Like