Copy values from one custom metadata entry to another

This is somehow cosmetic but I am wondering if that might be feasible anyway: I have custom metadata with values of “identifier”. That metadata was assigned an ID with a too narrow descriptive name, say “Zettel-ID”. As it is understandable that one cannot change IDs of custom metadata I was wondering if it’s possible to first create a new meta data ID called “ID” and then copy the values from “Zettel-ID” to “ID” via a smart rule? The reason I am asking is that I want to use that metadata field also for other Data such as PDFs and bibtex-IDs etc.

I am afraid it might only be viable via scripting and I already found some scripts in this forum (such as here) but I am very inexperienced (and insecure) regarding scripting and might need some assistance in the adaptation. Maybe someone has an idea? Maybe even without scripting?

Assuming the new ID is a text-based data type, e.g., Single-Line Text…
Do a toolbar search for Zettel-ID is not, leaving the text field empty, so it matches items with a value for the attribute.
Select the search results, then choose Tools > Batch Process and set it up like so…

In the first field, Control-click > Insert Placeholder > Custom Metadata > Zettel-ID.
In the second field, just leave the text field empty to clear the Zettel-ID after the change.

Simple and no scripting involved!

1 Like

Thank you! That’s genius and made me just realise that I need to delve into smart rules and batch processes in the documentation once more

You’re welcome.