Copying value from a field *or* another field to another single field

I searched the existing forums and didn't find an answer, and I tried a bunch of boolean stuff and it didn't work.

Recently discovered my CD ripping program has been putting the record label in different fields for mp3s vs. FLACs. I had planned to copy those values into COPYRIGHT with some extra text added on with a custom action. Everything I try to accomplish just ends up swapping empty field value with the occupied field value.

So I'm trying to figure out an action where if the one field value, PUBLISHER, has data it will copy it to COPYRIGHT. If PUBLISHER is empty, then it can be assumed LABEL is not empty, and it will copy LABEL to COPYRIGHT.

My attempt was $if(length(%publisher%=0),%label%,%publisher)

This has hardly anything to do with scripting functions in MP3tag.
See the help:
https://help.mp3tag.de/main_scripting.html#boolean
I would like to draw your attention to teh $if2() function.

This would be broken down to an action of the type "Format value" for PUBLISHER
Format string: $if2(%publisher%,%label%)

1 Like

That worked with the added next step to then FORMAT VALUE %copyright% as %publisher%

So for everyone else reading, the procedure was an Action of two steps:
Format PUBLISHER with the format string
Format COPYRIGHT with PUBLISHER

It copies non-empty LABEL into PUBLISHER then copies PUBLISHER into COPYRIGHT

Actually, I was able to simplify it even more:

Format value: "COPYRIGHT": $if(%label%,%label%,%publisher%)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.