Smart Groups / Labeled Items Template

Data / New from Template / Smart Groups / Labeled Items

It says: “Adds a set of smart groups listing labeled documents”

Try as I might I can’t make this work - what am I missing?

Which version of macOS/DEVONthink do you use? Does it work after restarting DEVONthink?

thanks for getting back to me - this is for Ventura 13.6
Latest version of devonthink pro
unfortunately restarting doesn’t help

The template creates a series of smart groups, one for each color defined in Preferences > Colors > Labels

Also, you need to make sure DEVONthink has it’s automation requests permitted in System Settings > Privacy & Security > Automation, specifically DEVONthink —> System Events

Thanks for the reply

No matter what I do I can’t get this script to run and populate the smart groups.

I have checked re: permissions as above.

Do I have to have a particular database selected? if I have an existing smart group selected I notice the option is greyed out

You can’t put anything into a smart group.
You need to be in a location in a database, like its Inbox.

thanks for clarifying. Still no luck Is there any other reason why this would not be working?

I am just wondering if this is a symptom of a deeper issue with my client. I am not sure how to troubleshoot it further.

Other scripts do seem to work except for the “graph view one” which only works if I open it up externally in a web browser - but otherwise generates a ‘blank’ file when used natively in Devonthink

As @bluefrog said, “you can’t put anything into a Smart Group”. Smart Groups are views of items that match the rules you set for the group. Put your items into the database somewhere, then make sure your rule is defined to find what you just put in.

Thank you - yes I am trying to execute this script into a normal folder in a database- I have tried several in fact in different databases but the script doesn’t generate anything

Is there anything reported in the log window?

No unfortunately

When I run the script in the template package in script editor, I get this:

„System Events“ hat einen Fehler erhalten: „property list item “LabelDescription-1” of property list file “Macintosh HD:Users:ck:Library:Preferences:com.devon-technologies.think3.plist”“ kann nicht gelesen werden.

(Can’t read list item “LabelDescription-1” from property list file “Macintosh HD:Users:ck:Library:Preferences:com.devon-technologies.think3.plist” can’t be read.)

And in fact, the plist does contain only ‘LabelDescription-3’

plutil  -convert xml1 ~/Library/Preferences/com.devon-technologies.think3.plist -o - | grep -i label

Result:

<key>_Labeled Items.templatescriptd.zip</key>
		<key>_Labeled Items.templatescriptd.zip</key>
		<string>/Users/ck/Library/Application Support/DEVONthink 3/Templates.noindex/Smart Groups/_Labeled Items.templatescriptd</string>
	<key>LabelDescription-3</key>
	<key>LabelMode</key>
	<key>LabelModification</key>
			<string>label</string>
			<string>label</string>
		<string>https://www.devontechnologies.com/assets/downloads/devonthink/_Labeled%20Items.templatescriptd.zip#307-20220727020000</string>
	<key>com.devon-technologies.labels.prefPane</key>

I’m on Sonoma 14.1.1 with DT 3.9.4. Here’s what I have in my preferences:

And I do not have a single labelled item in the database I was running the script with. But that’s probably not the issue here?
Anyway, I can see (or rather not see) the same thing the OP sees:

  • The smart groups do not get generated
  • There’s nothing in the log (apparently the System Events error doesn’t make it through to the log)
  • But running the script in Script Editor shows it barfing at a missing entry in the Plist.

I promise that I didn’t touch the Plist, BTW. Not willingly.

1 Like

Thanks!
I’ll look at this today.

Thanks for digging deeper!