An Inbox unique to every Group?

When I first acquired DT2 and DttG (not too long ago), I thought I’d found research heaven. I laboriously moved notes from Evernote, OneNote, Bear, Notability, Simplenote, Nebo and Apple Notes; all the apps I had used to find my perfect solution with Scrivener, and loaded DT2.

I initially created a Database in DT2 for each chapter of a book I was working on and, within each chapter database I created many groups and sub-groups. This soon got somewhat out of hand as I quickly had far too many Databases for what was a single Book project.

So, I decided to restart over and created a single Database (for the initial book project) and moved all the former databases into the new single database but as Groups.

Nearly there!

This worked except for one flaw: I lost all my database inboxes when they became groups. I did not lose their contents as I’d preserved these. However, (at last) is there anyway DT3 can/will allow groups to contain there own Inbox? It is obvious from my progress that I’m new to the world of DT and I have never attempted scripting. I would not know where or how to start!

That’s not possible. You could create your own Inbox subgroups but for DEVONthink these are just ordinary groups and you have to ensure on your own that the inbox is used.

Interesting idea!

Try this script.

-- Create Inbox for selected groups

tell application id "DNtp"
	try
		set windowClass to class of window 1
		if {viewer window, search window} contains windowClass then
			set currentRecord_s to selection of window 1
		else if windowClass = document window then
			set currentRecord_s to content record of window 1 as list
		end if
		
		set thePath to POSIX path of (path to application id "DNtp") & "/Contents/Resources/Inbox.icns"
		
		repeat with thisRecord in currentRecord_s
			if type of thisRecord = group then
				set theName to name of thisRecord
				set theGroup to create location (location of thisRecord) & theName & "/" & "$ Eingang [" & theName & "]"
				set thumbnail of theGroup to thePath
			end if
		end repeat
		
	on error error_message number error_number
		if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
	end try
end tell

I would not suggest using $ and [] in the name. This can limit future automation possibilities, or at least add to error trapping.

Ah ok. Would .Eingang (Test) be better?

Off topic: Is it possible to get the plain text of a specific PDF page?

Internal names of groups have more flexibility, but I always err on the side of automation. So you could use either one, but why not something simpler, like Test - Eingang ?

image

Off topic: Is it possible to get the plain text of a specific PDF page?

Not unless that page was separated from the rest of the PDF.

Don’t understand this. What are “internal names”? And where do you error?

I use a special character at the beginning to see those groups always on top when sorted by name. Square brackets is a style thing, just like them :slight_smile:

Don’t understand this. What are “internal names”? And where do you error?

Internal names, i.e., names of groups (internal since they don’t exist in the filesystem). And I error on the side of UNIX-compatible naming wherever possible.

Thanks!

Tell us more about your use case

You could probably achieve what you are seeking through custom metadata, smart rules, and/or smart groups

Thanks for the reply. I’m really new at all of this having grown up in Windows and Microsoft Office! Devonthink Pro and dttg are now my stable-diet for Mac and IOS and I’m getting there slowly. I guess I’m just trying to shorten the procedure between sending a note or piece of information (pdf, photo etc.) into DevonThink but rather than have these new pieces of data sat in the Database ‘Inbox’ waiting for me to re-locate them into a specific folder of my choice, I thought it would be helpful to have, say, a drop-down box offering other alternatives to the Database ‘In Box’. Having an ‘In Box’ folder created for each and every sub folder within a datable would, it seems to me, be useful for those of us who ‘file’ that way. But I may yet find that I’m not using the software to the best of its ability…

A simple solution would be move move everything new into the Global Inbox and then use Smart Rules to move them to other Groups based on a Tag, filetype, file name, or content of the file. Then just move manually whatever is missed.

Thanks, that does seem to be the simplest solution. Many thanks for your help. Be well.

In case you’re trying to run the script I posted in this thread you’ll find that it doesn’t work in DEVONthink 3.6.

That’s due to DEVONthink’s new handling of “invalide arguments”. After the release of DEVONthink 3 I decided to continue to use “search window” in scripts so that DEVONthink 2 users could use them in, well, search windows. With version 3.6 that’s not possible anymore.

If you want to use the script you’ll have to replace this voluminous block …

set windowClass to class of window 1
if {viewer window, search window} contains windowClass then
	set currentRecord_s to selection of window 1
else if windowClass = document window then
	set currentRecord_s to content record of window 1 as list
end if

… with this neat line …

set currentRecord_s to selected records

… which does what the six lines have done. Wow, that’s great! :smiley: