How to group Smart Groups / Rule for DTTG based on tags?

I’m trying to group replicated files into specific folders within the Global Inbox, and want to also group them according to the tags that are affixed to them (within these folders).

Is there some way to set this up in Smart Groups and have it appear in DTTG?

If not that’s fine.

But then…how can I set up a Smart Rule (or even a simple script) so that I can groups files based on the tags that are affixed to them?

Thanks!

As an aside: I’m not convinced storing files in the global inbox is the best of ideas. It may at least be worth reconsidering. The global inbox is stored within the user library and files within it are governed by certain limitations (e.g., you can’t edit them using Preview). Depending on your backup strategy you may or may not typically include the global inbox. Things to be aware of, anyway. To an extent this caution is influenced by my own personal preferences though (which include that an inbox should preferably always be empty).

There is no easy way as far as I am aware. The only way I have come up with in the past is to replicate any record in a smart group to a real group (so you might have a smart group collecting all items tagged “iOS” for example; then you would have a smart rule which deleted all items from a group and then replicated the contents of the smart group to that group). That might be a realistic option if you are not constantly creating new smart groups but it’s not really a clean and satisfactory solution to me. The major drawback is certainly that it is a one-way thing - if you changed anything in the group from DTTG then that change would lost.

DEVONtech have previously argued that including smart groups in DTTG is problematic, because the UI does not lend itself to creating or editing smart groups. As such, so they argued, they would be forced to implement “crippled” smart groups (so, for example, an ability to sync smart groups from DT, but no option to create smart groups). Whilst that may be acceptable to users who use both DT and DTTG, they felt that they would not be catering sufficiently to DTTG-only users. (This is my memory of the conversation; my words, not DEVONtech’s.) Whilst I understand this logic, I personally don’t subscribe to it. I don’t actually like to suggest badgering DEVONtech, but I personally think smart groups on DTTG are long overdue, and every user going +1 must be worth it, I would think. Again, this is very much my opinion - it doesn’t have to be anyone else’s.

Assuming the groups already exist, that would be a simple rule (if tagged x then move to x), assuming only one tag. Otherwise things get complicated again…

1 Like

Thanks for your reply; sorry for my late answer to it.

I’m happy to consider another approach than the one I’m using to store files in the Global Inbox.

For me, it seems like a good approach since I only sync that one DB, i.e., the Global Inbox. (I prefer to work on most of my other stuff on my MacOS and not in iOS, both because of the size of the other DBs and the other files don’t work as well in iOS/DTTG.)

Also, I often read and annotate the PDF files that I clip & save in DTTG / DTP in MarginNote, which is a terrific annotation app (though it has flaws, including a poor organizational-folder system). So, I wouldn’t be opening DTTG-clipped PDF files in Preview, but in MarginNote – which has a good iOS platform that also syncs with MacOS.

Anyway, putting all of that aside – and even ignoring the issue of replication for the moment – is there any way to simply group group files based on the tags that are affixed to them?

I understand that one can do this by, as you say, creating “a simple rule (if tagged x then move to x).” I assumed there might be a way to set up a general rule (in Smart Rules or even in some kind of script) that might accomplish this…

Is that remotely possible w/o too much complication?

Thanks so much!

I’m not a fan of groups (folders), but my solution would be an applescript.
This gives a lot more flexibility than a smart rule

Global Inbox

I also recommend getting your notes out of the Global Inbox
By definition, Inbox is a temporary holding area,
and a separate database gives more options

2 Likes

Thank you. Would you or any other users have a suggested script I might be able to use for this purpose? I’m sorry to ask but I’m all thumbs when it comes to creating scripts…

I hear you. But if I use Global Inbox to temporarily hold files that I would then open in another app (and then remove from the Global Inbox) is it any better to create and use a separate DB for the same function?

Thanks very much…

Here’s a sample of the script I use to process files in my inbox

tell application id "DNtp"
	
	set selectedNotes to (get selection)
	
	repeat with theNote in selectedNotes
		
		--
		--   Code to identify the variables
		-- 
		set theFilingGroup to get record at "/General-Filing" in database "FilingCabinet"
		
		set theNote to move record theNote to theFilingGroup
		set name of theNote to theTitle
		set tags of theNote to tags of theNote & theTagList
		if setDueDate then add custom meta data theDueDate for "taskduedate" to theNote
		set label of theNote to taskLabel
		set locking of theNote to true
		
	end repeat
end tell
1 Like

Oh wow… Thank you!

So, this script groups files by tags? And if I were to use it, would I just apply it to the groups that I’m placing files into? Do I need to make any other changes to make this work?

Thanks so much again!

I have a single FilingGroup; “/General-Filing” in database “FilingCabinet”
I suspect you have multiple FilingGroups
and will set the value based on criteria

1 Like

I see. Shows you how ignorant I am about scripts and how they work!

So, I’d like this apply this to three groups in my Global Inbox:

1-URGENT READING
2-HIGH READING
3-MEDIUM READING

So, I guess I would change…

set theFilingGroup to get record at "/General-Filing" in database "FilingCabinet"

…to…

set theFilingGroup to get record at "/1-URGENT READING" in database "FilingCabinet"

Is that right? Should I change theFilingGroup as well? And then should I apply this script to my three folders within my Global Inbox: 1-URGENT READING; 2-HIGH READING; 3-MEDIUM READING ?

Thank you so much, @DTLow … Really appreciate your help!

Note the database name; you probably want to change that

You could have 3 scripts
I was thinking more like
if “URGENT READING” is in theTagList then
set theFilingGroup to get record at “/1-URGENT READING” in database “FilingCabinet”
else if …

1 Like

Thanks. Well, at first I thought I should change that line to…

set theInboxGroup to get record at "/1-URGENT READING" in database "Inbox"

And then change the next line to…

set theNote to move record theNote to theInboxGroup

Again, the parent DB, in this case, is the Global Inbox – but it appears just as “Inbox”…and I’m not sure if it’s necessary classified as as “group.”

But I’m not sure this script will accomplish what I’m seeking, since I’m placing the files in the 1-URGENT READING; 2-HIGH READING; 3-MEDIUM READING groups in my Global Inbox, and then I’d like to have them further grouped based on the tags that are affixed to them (i.e., that were attached to them earlier, outside those priority groups).

Does that make sense?

Thanks so much again…