Unable to move items from Global inbox to database groups

Hi. I have seen this topic elsewhere but responses have not resolved my issue. When I attempt to move items out of Global inbox for some items (not all) the logging dialogue tells me that item already exists regardless of where I attempt to save the item. However, I am sure the item does not already exist. When I do a search using the search function the only item that appears is the item I am trying to move. The database is small enough I can do a visual search for items to double-check and I can confirm the items I am trying to move does not exist elsewhere outside of the Global inbox.

Emails or PDFs?

PDF+text

Where did the PDFs come from?

Pubmed, psych info, basically reputable databases

At least one or more items with the same internal identifier exist already in the destination database, maybe older versions having a different name? One workaround is to duplicate the items instead of moving and then to delete the originals.

No the item does not exist even under a different name. I checked for this by searching for exact phrases in the document.

What kind of document did you try to move? Did you ever duplicate databases in the Finder and use both copies afterwards?

No the item does not exist even under a different name. I checked for this by searching for exact phrases in the document.

Unforunately, that’s not a reliable method in this case.

Select the file in the Global Inbox and run this script, selecting the destination database in the dialog…

tell application id "DNtp"
	activate
	set sel to (item 1 of (selection as list))
	if sel ≠ {} then
		set recordUUID to uuid of sel
		set originalName to (name of sel)
		set originalDatabase to (name of (database of sel))
		set originalLocation to (words of (location of sel as string))
		set currentDatabases to (name of (databases))
		set chosenDatabase to item 1 of (choose from list currentDatabases with prompt "Choose the destination database:" without empty selection allowed)
		set matchedRecord to (get record with uuid recordUUID in database chosenDatabase)
		if matchedRecord ≠ {} then
			set recordLocation to (words of (location of matchedRecord as string))
			set recordName to (name of matchedRecord)
			display alert "" & (originalDatabase & ": " & originalLocation & " > " & originalName) & return & return & (chosenDatabase & ": " & recordLocation & " > " & recordName)
		end if
	end if
end tell

PDF+text and no to your question about duplicating

I’m a social scientist, not a technician…I haven’t the slightest idea how to “run a script” :grin:

  1. Select the item in the Global Inbox.
  2. Open /Applications/Script Editor.
  3. Copy and paste the code shown above.
  4. Select Script > Run.

ok,wish me luck :nauseated_face:

Nothing to fear :smiley:
We wouldn’t tell you (or anyone) to do anything unsafe with your data.

1 Like

Ok, I see. The script tells me where the item is located?

It should report the originally selected file and also the database, location, and name of the file with the same UUID in the chosen database.

It also should show there is indeed a file with the same UUID :slight_smile:

In deed you are right. Thanks. I know nothing about scripting. I assume if I have this issue in the future…I can use this script again? If so, how do I save it?

Yes, you can.

In Script Editor, you can choose File > Save. In the Save dialog, press Command-Shift-G and paste: ~/Library/Application Scripts/com.devon-technologies.think3/Menu. This will make it available in the Script menu in DEVONthink for future use.