Great, thank you!
I was also able now to uncheck entries which don’t have the tag (which I tried in vain for the last hour):
tell application id "DNtp"
if (selected records) is {} then return
repeat with theRecord in (selected records)
set tagMatchedFiles to (selected records whose (tags does not contain "xxx"))
repeat with theRecord in tagMatchedFiles
set md to false
add custom meta data (md as boolean) for "yyy" to theRecord
exit repeat
end repeat
end repeat
end tell