Format Value action deletes multiple fields with same name (2026)

Format function deletes my multivalue COMPOSER field

I am using format to replace composers separated by com on multiple fields with the same
name.

  1. In my case, I have the composer field filled “composer a, composer b”
    COMPOSER: a, b
  2. the format $replace(%COMPOSER%,',','\\') is applied
  3. First run, it creates correctly 2 fields like this:
    COMPOSER: a
    COMPOSER: b

If I run it again, the second field COMPOSER: b is deleted.
It is a risk because it deletes useful data.

I've tried to split using regexp, but it doesn't work properly.
In most cases, the \\ is not understood as a field separator.

This bug has been reported for 7 years and is still there.

Regards,
Helio

The separator \\ is a only a visual indicator that there is a multi-value field - please use the forum search function to find threads that deal with seemingly unreplaceable \\. In fact the values for these fields are separated by binary zeros.

To deal with all the multi-value fields you have to merge them first

or with the scripting function $meta_sep() and set a different separator than \\.
After such a field has been manipulated, it may be split it again.

In your workflow

you would have to append the plain %composer% to $meta_sep(composer,\\)

So I would say it is intended and known behaviour.

None of the MP3tag documentation answers refer to the well-known bug in the format function that deletes existing data. Is there any ticket on the backlog to fix it?
It deletes data silently, and it could be affecting many users.

That you don't know this function and stumbled over it still does not mean it is a bug.
There are functions to avoid the behaviour that you noticed and there are a lot of threads that deal with multi-value fields and the way to treat them.
e.g. here:

If you want to insist that the documentation does not say it, then see this explanation about "Replace:

Replaces the given Original string from the selected Field with the Replace string. If the replacement string is empty, the original string is removed.

It says "Field" and not "Fields" or "type of field".
Already the failure to replace the \\ should have triggered a warning for you.

If you want to avoid such problems in the future, do not use multi-value fields (which are evaluated by only very few players anyway) but use a single field with a separator that is not interpreted to split up the fields.
The semicolon that you chose in the initial run of the (failing) replace action may be a good approach.
In short: surprising behaviour is not necessarily buggy behaviour.

If you don't want to think about it as a bug, I would say the documention should have a warning to not use it on multi-value field.|
Multi-Value works properly on my player and fits other purposes for my use case.

What confirmed "bug" has been reported?

Working with multi-value tag fields can be challenging. Especially since there are several methods of managing them, depending on the player and media manager being used. Some simply use defined characters within a single string like semicolon or a pair of slashes. Others use strings that have been split into completely separate fields.

Regardless, the only way to work within mp3tag to manage these is to merge them into a single string. Once the desired changes have been applied you can separate them again if you choose. There is currently no way to identify different fields with the same name.

Not totally clear the %composer% in your comment.
I'm testing this $meta_sep(composer,\\) to replace , to \\ and got no results at moment

Discogs usually sends composers separeted by coma.
The whole idea is to split the composers in a mult-value.

Are you looking for an action that splits the COMPOSER field into multiple fields, using the comma , as a separator?

You could use an action Split Tag Field for that.

This action can be applied repeatedly on your files, even if you applied the action before so that there are no more fields to separate.

Let me know if this helps!

Already did it and works better form my use case than $format()

Thanks, split tag field works better and is safe.