Duplicate Groups & Tags... AppleScript Not Working

I’m running DEVONthink 4 v4.2.2 on an M1 MacBook Pro….macOS Tahoe 26.4.1.

I get no response at all when I click on Duplicate Groups & Tags…. I’ve done everything I can think of to get it to function with no success. Any assistance will be appreciated.

Perhaps stating the obvious, you are supposed to have an article selected when you do this. Have you got an article selected?

Next a popup window is supposed to popup with the names of databases that you can duplicate to. Do you see a popup window?

Very close… you need to select a group or a tag before running the script.

And this is duplicating without contents, e.g., if you have a group structure you want to re-use in another database but don’t want the contents.

Thank you for suggestions to select a group before invoking the script; however, this was done before I initially posted my issue.

I have attempted to run the script on groups in other databases with no success. I’ve run a Verify & Repair Database and Rebuild Database before attempting to run the script…again with no success. I have also uninstalled and reinstalled the script with no success.

I have found a workaround that finally worked, but I can’t believe this is the intended way it was meant to function:

  1. I create a label at the top level of the group I want to duplicate

  2. I create a new group of the same name as the original

  3. I move the entire hierarchy of the original group to the newly created group

  4. I invoke the AppleScript and select a different database as it will not create the empty group hierarchy within the same database

  5. After the new, empty group hierarchy is created I rename the top level group and move the entire structure to the original database.

It works and the results are what I need, but clunky for sure.

No, none of that is necessary and I just ran it several times last night with no issue.

Are all of DEVONthink’s Automation requests allowed in System Settings > Privacy & Security ?

Yes, all DEVONthink Automation requests are allowed. DEVONthink also has Full Disc Access.

I’m thinking the AppleScript itself may be corrupt as other installed Applescripts function as they should. When I checked DEVONthink→Install Add-Ons… I found options grayed out…see below.

Do you feel reinstalling the AppleScript in question should be pursued? If so, what do I need to do?

Open the script in Script Editor.app. Show the log and select the “Replies” tab. Now run the script. What do you see in the log?

That’s just how the script is written. It only duplicates to another database.

1 Like

It would be extraordinarily unusual for the script to be “corrupt”. In fact, if it was, I would be more concerned about the health of your hard drive.

There’s nothing unusual in the Install Add-Ons panel. Everything is already installed so logically the Install button is disabled.

Thank you for that info…

After running the script nothing appears in the “Replies“ tab.

Again, the script runs properly only when a record contains a label within a group.

You have to run the script in Script Editor. You do that by pressing the play icon in the toolbar or from the menu via Script > Run.

I don’t understand what you’re trying to describe. A label is not a record contained by another record, it is an attribute (or property) that a record can have.

I think some screenshots would help. Can you show us a selection that works and a selection that you would expect to work, but doesn’t?

1 Like

Senario 1 - No label attribute / This does not work

Log history

=====

Senario 2 - Record with label attribute / This works

Log History

This has nothing to do with your labeling. You select groups in the item list, not the Navigate sidebar.