Using tag cloud to see all tagged documents in group and child groups in one list

I love the tag cloud. However, it only shows me a list of documents that contain the selected tags that are directly in the selected group (tagged documents in the child groups are selected, but I have to go through all of the child groups manually to find them, and they are not in one list). I most often want to see a single list of all of the documents that contain the tags in the selected group and its child groups.
Is there any way that exists, or any suggestion about how I might make a script or utility, that would allow me to use the tag cloud to see all of the documents in the selected group and its child groups in a single list? This would be like using the tag cloud as a shortcut for creating a smart group for all documents that have the selected tags, searching in the selected group.

Thanks in advance.

The filter can be applied to smart groups too, e.g. the global default smart group “History” shows all documents from all opened databases.

Thank you for your reply. I’m not sure I understand how this smart group would be used for my purpose. I would like to select a specific group, which automatically limits the tag cloud to tags in that group. Then I would like to select several tags and see a list of all items in that group (and child groups) with the selected tags. How would I use the history group to do this?

In that case you would need a smart group searching only in this group for documents. Or you could search in the group for documents and then apply the filter, this is possible too and will give you a flat list.

I’m not following. The Tags filter shows the tags of items in subgroups as well.

Note only the devontech tag is used in the root of this group.

Here are the subgroups expanded.

Yes, it does show the items that are tagged in subgroups, but you have to expand all of the subgroups. I normally use the ‘show only documents’ option, so it is not straightforward to expand all of the groups to see the complete list. My preference would be a way to see a single flat list, with ‘Show only Documents’ active.

I know that I can make this happen in a smart group. However, this is a lot of overhead. My desire is to find a way to initiate the smart group search just from the tag cloud. i.e., by selecting a group and selecting tags in the tag cloud, I would see the complete, flat list of all of the items that contain the tag within the group and its children (with ‘show only documents’ selected). I am only marginally proficient in applescript, so I was wondering if anyone had a clever way or could direct me to a strategy within applescript that would let me have this behavior using the tag cloud.

This script initiates a search for either only documents or documents and groups. You can then use the tag filter with a flat list.

@cgrunenberg Would it be possible to remove a tag from the filter by simply clicking it? I find the small cross far too small to remove tags in a comfortable and fast way. Not removing the cross, just extending the options :slight_smile:

-- Initiate search to use Tag Filter with flat list

-- Select group(s) or one smart group in the sidebar and run the script (I would assign a shortcut to it)

property showOnlyDocuments : true

tell application id "DNtp"
		if exists think window 1 then
			if showOnlyDocuments = true then
				set search query of think window 1 to "kind:any scope:selection"
				set search query of think window 1 to "any: kind:group kind:any scope:selection"
			end if
		end if
	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

Thank you so much! This is perfect.

1 Like

The tag is selected after clicking on it and can be removed by pressing the Delete or Backspace key.