Replacing only when field actually has a value

Hi I have a question and haven't been able to find an answer in the forums so far.

I use the FORMAT VALUE function to fill BAND with the value of the ARTIST field. However, sometimes ARTIST is blank while BAND is filled. If I execute the replace commando I end up with an empty BAND field.

So my question: How can I let mp3tag replace BAND with ARTIST only when ARTIST actually has a value?

I would always apply a filter first and check whether the action will hit the right files.
So a filter to find all the tracks with empty artists:
%band% IS "" AND %artist% NOT IS ""

Alternatively you could sort first the %band% column and then the %artist% column which should group all similar files togehter.
Then select them and start your action.

Create an action like the following. This will either overwrite BAND with ARTIST if ARTIST exists, or keep the old value unchanged if ARTIST does not.

Action type: Format value
Field: BAND
Format string: $if2(%artist%,%band%)