Populate a field if another tag is 1 - otherwise do something else

Hi all, hope you can help...
I want to populate the Album Artist field to be 'Various' IF the COMPILATION tag is 1 - otherwise clear the COMPILATION tag and copy the Artist tag to the Album Artist tag.
What's the best way to do this?

You can create two actions of type "Format value".

%ALBUMARTIST% <== $if($eql(%COMPILATION%,'1'),'Various',%ARTIST%) %COMPILATION% <== $if($eql(%COMPILATION%,'1'),%COMPILATION%,%DUMMY%)

... or ...



Detlev, that is perfect - many thanks!!
I created an action and in the first box I selected ALBUMARTIST and pasted $if($eql(%COMPILATION%,'1'),'Various',%ARTIST%) into the 'format string' box. I then added a second and selected COMPILATION and pasted $if($eql(%COMPILATION%,'1'),%COMPILATION%,%DUMMY%) into the 'format string' box.
I assume that is what you meant - two separate 'commands' in one action.?.

When I list tracks, for some tags I can type directly into the box within the main listing. When I add COMPILATION to the tag list, if I want to change it, I can't just type the entry and have to go to the left hand side and fill it in. Is there a way I can just type into this tag in the 'list' view of the main window?

Again though, MANY thanks!

Have a look at the help section for columns:
and there at the explanation for "Field".

You have to fill in "Value" and "Field"

Actually, I should have said:
Do create one action group with two actions of type "Format value",
give this action group a meaningful name,
so you can invoke this "action script" by its name from the menu.

Mp3tags allows to create an user defined column in the main spread list.
Do a secondary mouse click on the column header of the main spread list, then the "Column" dialog will be opened.
Fill in a meaningful column header name: Compilation
The value, which should be displayed, is: %COMPILATION%
The tag field, which should be set by changes in this column, is: %COMPILATION%


Thanks everybody!
I went to View - Customise columns. I selected the Compilation tag that I had previously added and filled in the 'field' box with %compilation%. I can now type directly into the right hand side tag too. :slight_smile:

I wish I understood how the first script works.
Is it:
IF compilation is 1 then make ALBUMARTIST 'Various', otherwise make it ARTIST ?

For the second line, is that the one dealing with changing the COMPILATION tag if required?
i.e. IF COMPILATION is 1 then copy COMPILATION to COMPILATION (i.e. keep it!), otherwise make it %DUMMY% (which I assume means clear it.)

You have understood it correctly.