Finding Replicants or Not

Is there an easier way to find a record which has a certain number (0, 1, 2…) of replicants?

Is have a database with about 100,000 files. Al these live in the main “Library” folder, if you like. All of them have two properties: a location and a function. All the files have 2 replicants: 1 in a subgroup by location, and 1 in a subgroup by function (there are limited locations & functions). Besides this, all the files have particular tracking labels and aliases; I can’t touch those.

I say all but 1 is missing. The file in the Library folder, but doesn’t have replicants. Or: there are two files which don’t have 2 replicants: one missing a replication in location, one missing a replicant in function. I know this because the total count of records DEVONthink shows has 1 fewer in both location and function groups. Grr…

I can run an AppleScript past ALL files in the Library to check how many replicants each record has, and flag the ones which don’t have 2. It’s running right now; it should have completed the check in about 6 hours from now.

Is there any way to search a database for records and the count of replicants they have?

It’s only possible to find replicated items (see condition Item is Replicated of advanced search or just enter item:replicated in the toolbar search field) but not to specify a number of replicants. But a script is able to retrieve such items.

E.g. this little snippet searches the current database for documents having two replicants:

tell application id "DNtp"
	set theResults to contents of current database whose number of replicants is 2
	set search results of viewer window 1 to theResults
end tell
1 Like

Thanks! That’s awesome and just what I needed! :+1: :+1: :+1: