Is "Exclude From..." search working in DTPO pb2?

Hi-

I’ve got a few groups that I’ve checked to exclude from searching,

Picture 1.png
but it doesn’t seem to be working. I assume I can just set this after files have been added to the group, and then I shouldn’t get them in my results from the search window.

What am I doing wrong?

Best, Charles

Those settings are specific for each item, the children of a group don’t inherit it (e.g. as every item can have multiple parents and therefore multiple settings).

Does anybody know if there is a way to exclude an entire group from searches/see also, as the original post suggests? Or is the only way to do this without manually marking each file for exclusion to create a separate database?

Hello,
Try


--traverses the folder hierarchy from selection down
--and switches off AI functions ("see also" and "classify")
--at the moment doesn't deal with multiple selections, only
--a single record or folder. easy enough to add though.
tell application "DEVONthink Pro"
	set sel to (get selection)
	my switchAIoff(item 1 of sel)
	return
end tell


on switchAIoff(passeditem)
	tell application "DEVONthink Pro"
		repeat with curItem in passeditem
			log (get name of curItem)
			set exclude from classification of curItem to true
			set exclude from see also of curItem to true
			if (get number of children of curItem) > 0 then
				my switchAIoff(children of curItem)
			end if
		end repeat
	end tell
end switchAIoff

(I think this was the first applescript I ever wrote so may be less than elegant, but it works–no error trapping though)

Thanks acl. I’ll give this a try.