Set "custom" data field to blank?

I am experimenting with custom metadata in DT2 desktop, particularly the “status” field. I have configured that field in “preferences” to show status of “writing,” “waiting for edit,” “waiting for progress” or “Done.”

So far so good.

However, I unintentionally set the status for several documents and now I find there is no way to reverse that. For these documents, I just want the status field to be blank. Not set. How do I do that?

Which type is this meta data (e.g. boolean, text)?


Seems it’s not possible to add a blank value so adding a new value e.g. - would be the easiest way.

I wrote a script that deletes specific custom meta data but to use it you’ll need to download a script library. Might be overkill.

This script sets it to blank.

-- Set custom meta data to blank/no value

property theMetadataIdentifier : "test" -- set the identifier as found in preferences

tell application id "DNtp"
		set theRecords to selection of viewer window 1
		if theRecords = {} then error "Nothing selected"
		repeat with thisRecord in theRecords
			add custom meta data "" for theMetadataIdentifier to thisRecord
		end repeat
	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
1 Like

Works like a champ! Thanks!

1 Like