Duplicating items in smart lists

Currently, if you are viewing an item within a smart list, you cannot duplicate it directly to its original location. For some reason, the option to duplicate (such as using CMD+D) is disabled in the menu bar. To duplicate the item, you must first reveal its original location, which is an inconvenient extra step.

Is there a workaround for this issue? If not, could you please enable the CMD+D shortcut to work within smart lists, allowing for direct duplication to the same location?

This simple script works in my very simple test.

tell application id "DNtp"
	set theSelection to the selection
	repeat with theRecord in theSelection
		duplicate record theRecord to (parent 1 of theRecord)
	end repeat
end tell

Why is it inconvenient? Presumably, you’re not duplicating things just to duplicate them but instead to do something with the duplicates. So revealing then duplicating seems to be the logical approach.

You’re incredible. Thank you very much :pray:

I want to preserve the original version before making edits to an item, which is why I require a duplicate of the item to remain in its original location.

Besides, I wonder why the option to duplicate is not readily available in the first place. What could possibly be the downside of enabling the CMD+D shortcut to function within smart lists?

A smart group isn’t a container, i.e., it doesn’t have anything in it. A matched item could be a replicant, thus having more than one parent. Only one instance of a replicant is displayed, so duplicating it could create the duplicate in an unintended location. Even the script offered above could fail in this way.

Development would have to assess any change in this behavior and yes we have people who use many replicants. In fact, I have a support ticket where someone has over 60,000! :flushed:

1 Like

Maybe a version control system would be a better choice (eg Github). Because with your approach, what happens if you want to keep the first copy as an intermediate step and make a copy of that? And then of the next copy …

I also have a smart rule “create version”, though I don’t know where that comes from. Might be an add-on from the DT website. I never used that, though. But it seems to be a cleaner approach than just making a copy of a document somewhere else.

This is one of the default smart rules.

A future release will actually support versioning.

3 Likes