Smart groups - a broken feature in Devonthink?

Hello ,
I didn’t buy yet one of Devonthink’s products, (trial phase) but figuring out if Devonthink is the right tool for me or not.

I love to automate my applications and buy just software which allows that kind of freedom.
I wrote quickly a script but found out that it isn’t working because the implemented applescript isn’t powerful enough.

The below script should produce automatically smart groups based on finder tags of related documents in my folder structure. A tedious task- and ideal to-do for a machine. My folder setup:

@Context folder (with documents and finder tags)
smart group

tell application "DEVONthink Pro" to tell current database
   set AllTopics to name of children of record "Topics"
   set AllId to id of children of record "Topics"
   set getProj to choose from list AllTopics with prompt "Choose Project..." default items (item 1 of AllTopics)
   if getProj is false then
       set getProj to getProj as text
   end if
   set dd to 0
   repeat with a in AllTopics
       set dd to dd + 1
       if a is in getProj then exit repeat
   end repeat
   set getId to item dd of AllId
   set getCont to children of parent id getId
   set Alltags to meta data of item 1 of getCont
   set KMDkw to item 3 of (Alltags as list)
   set theGroup to create record with {name:KMDkw, type:smart group, tags:KMDkw} in parent id getId
end tell

Our AppleScript is certainly “powerful enough”. You are just trying to do something that is unsupported. You can’t create Smart Groups via AppleScript at this time but it may be possible in a future release.

With all respect I code already a decade, and not just workflows. So if I send a clear command type:smart group, I expect that too. Better having less in the dictionary at this point.
Creating smart folders is tedious for all the tags I have assigned.
I’m using older software which crashes sometimes, so I was looking for yet a better replacement.
But scripting is essential for me.

I have scripted many, many apps in the past 25+ years, and there are always exceptions to what can and can’t be done (as well as dictionaries not always being accurate, even with Apple’s own AS dictionaries).

Also, a Smart Group is no mere group. Can you make a smart group via AppleScript? Technically, yes you can. However, it is not going to be functional as there is no option to set search predicates or the search scope.

I also added: tags:KMDkw
Please use my code instead to put me down. I don’t criticize Devonthink. Just their apple script functions.

I omitted this from my example, as the point was just to show creating a non-functional Smart Group.

I’m not sure what you mean. :question:

Beyond the standard suites, commands and elements and properties are added by the developer. AppleScript commands, etc. don’t just appear because a function has been added to an application. (If they did, it would happily take a lot of work off a developer’s shoulders! :smiley: ) Some things are omitted. Some are planned but not currently implemented. As I said earlier, Smart Group creation by AppleScript may be available in a future release.