Finding replicants

Does general search find replicants? I mean, if i have the same item, say “paul allen” replicated in different groups, whey I hit “paul allen” in the search field Devonthink finds all the replicates or just the first instance?

Thanks a lot.

Only one instance is returned.

Thank you Christian. It is logical. Thanks.

Sorry, but I cannot find any logic behind that. Why shouldn’t DT find all instances of a replicant?

Searches are usually done to find information. As I sometimes have 4 or 5 replicants of a document (usually for project purposes), listing all of them in the search results would add nothing to my search for information.

If you select a replicant in a Search result and choose Reveal (Cmd-R) it will be selected in your top-level database view. Now choose Go > Next Instance and you can “walk” through the location of another instance of that document, and so on.

Thanks bill for that useful “go to next instance” trick. I said it was logical because, as you said, you don’t want your search to be populated by repeated results.

I’ve found in another thread a script which finds replicants (i’m lazy to post the link). I’ve found it useful, because I make a lot of replicants and I need to know how many of them I’ve done, and where I’ve had classified them.

That’s right, Bill. But it is one thing to search for an information and one other to search for replicants. I don’t want to see the contenting information of a replicant, when I search for replicants as replicants. In that case I rather like to find where I dropped the replicants, perhaps to see, if I didn’t forget an important group.

That’s why I cannot agree with your kind of »Nobody wants that really« opinion.
It could not be very difficult to write a script for that, I think, and as radiio says, he happened to find one.

Perhaps you may fight down your lazyness and find a chance to jot down the link you fond, radiio. Thank you. :slight_smile:

Here’s the script that was referred to in the above posts–at least I believe it’s probably this one. It’s very helpful. Cheers to Eric for developing it.

—reveal replicants script 1.1 by Eric Oberle
set replicant_on_root to false
tell application “DEVONthink Pro”
set the_item to selection
if the_item is {} then
error “Please select a replicant.”
end if
set the_item to first item of the_item
set num_reps to (number of replicants of the_item)
if num_reps is 0 then
error “Please select a replicant.”
end if

set the_name to name of the_item
set num_reps to (number of replicants of the_item)
set the_parents to parents of the_item

try
if current group is “current application” then
set current_group to {root of current database}
else
set current_group to current group
end if
on error
set current_group to {root of current database}
end try
log current_group

set location_of_selection to location of the_item
if location_of_selection is “/” then
log “selected item has replicant on root”
set replicant_on_root to true
end if

set unique_parents to {}
set location_of_parents to {}

----weed out replicants in same group as seleted one
repeat with i from 1 to count the_parents
log {the_parents’s item i}
log “location of parent=” & location of the_parents’s item i
if the_parents’s item i is not current_group then
log "**found unique replicant " & location of the_parents’s item i
set unique_parents’s end to item i of the_parents
set location_of_parents’s end to (location of item i of the_parents) & name of item i of the_parents

  end if 

end repeat
log “location” & location_of_parents as string
if replicant_on_root then set location_of_parents’s end to “root”

if location_of_parents is {} then return
repeat until false
set x to choose from list the location_of_parents with prompt "These folders contain replicants of " & the_name & “. Double click (or hit ok) to open a given parent in a new window, click cancel button to exit.”
if result is false then
return
else
set location_chosen to item 1 of result
if location_chosen is not “root” then
set the_index to my list_position(location_chosen, location_of_parents)
set the_location to item the_index of location_of_parents
set the_record to (item the_index of unique_parents)
set the_Window to open window for record the_record
set full_location_of_the_replicant to the_location & “/” & the_name
set the_replicant to get record at full_location_of_the_replicant
set selection of the_Window to {the_replicant}
else
set the_id to get id of the_item
set x to get record with (the_id) in root of current database
set x to {x}
set the_Window to open window for record root of current database
set selection of the_Window to x

     end if 
  end if 

end repeat
end tell

on list_position(this_item, this_list)
repeat with i from 1 to the count of this_list
if item i of this_list is this_item then return i
end repeat
return 0
end list_position

Thank you, JR.