Request: new replicate here

I use replicates a lot.

Sometimes I find myself in a group and think: why isn’t XYZ (a doc or group) replicated here?

To repair this obvious mistake is not straightforward:

  • open a new window
  • search for XYZ
  • open classify inspector
  • search for the group i was in
  • replicate
  • close window

I wish for a “new replicate …” (contextual) menu item that lets me look for a doc/group to replicate in current group.

1 Like

Development will have to assess this request.

1 Like

You could try this script. Then it’s simply

  • start a search in the current window
  • search for XYZ
  • run the script and use the the group selector’s search
  • ESC to quit search and get back to your group

However it seems the window’s selection is lost and the replicated record is selected instead. Not sure if this is intended.

I use the script myself but seldom encounter your situation, so I’m not sure if it’s of any help.

-- Replicate record(s)

tell application id "DNtp"
	try
		set windowClass to class of window 1
		if windowClass = viewer window then
			set theRecords to selection of window 1
		else if windowClass = document window then
			set theRecords to {content record of window 1}
		end if
		if theRecords = {} then error "Nothing selected."
		
		set theGroup to display group selector "Replicate in:"
		set theGroupsDatabase to database of theGroup
		
		repeat with thisRecord in theRecords
			if (database of thisRecord) ≠ theGroupsDatabase then
				error "Not possible. You're trying to replicate to another database."
			end if
		end repeat
		
		repeat with thisRecord in theRecords
			replicate record thisRecord to theGroup
		end repeat
		
		display notification "Replicated"
		
	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
2 Likes

great script !!! thank you !

Thx @pete31for the script!

I tried it and it doesn’t make the workflow much easier (saves me one step: no need to close the window).

Try this.

  1. With the current (i.e., target) group selected in the sidebar,
  2. Press ⌥⌘F to activate search, and type the search request in the Search bar.
  3. In the search results, select the document you want replicated to the target group and ⌥⌘-drag that item from the search results into the target group in the sidebar. That will create a replicant in the target group.
  4. press ESC to exit search

IMO, when software does not work as I imagine it might, it is not an “obvious mistake” on the developer’s part.

1 Like

Thx @korm, it gets me closer to a solution. I can indeed perform a search “in place”, find the doc I want to replicate, replicate, then exit search mode.

IMO, when software does not work as I imagine it might, it is not an “obvious mistake” on the developer’s part.

Lemme clarify : the “obvious mistake” was me forgetting to replicate something somewhere, not the developers’.

The next release will include a new command Go > To Document… Both Go > To Group… and Go > To Document… can be detached and support drag & drop too. E.g. you could search for the desired group/document and then simply insert a replicant via Command-Option drag & drop.

4 Likes