IF "Albumartist" IS "", "Albumartist" = "Artist"


Is there any way to name the TAG "Albumartist" the same as the TAG "Artist" only IF the TAG "Albumartist" is empty?

I'm on a death end since the REGEX action doesnt work with other tags outside of the one you are working with..or at least i think it doesnt

Thanks once again for your time!

This function will test ALBUMARTIST before executing the replacement:

$iflonger(a,b,x,y) if string a is longer than number b, x is returned, otherwise y.

Action type: Format value
Formatstring: $iflonger(%albumartist%,0,%albumartist%,%artist%)

As this will probably only happen a few times in the life of a file: why don't you filter for these files?
You could then apply a simple "Format value" action for ALBUMARTIST with the
Format string: %artist%
to these files.

Thank You!!!!! Is there a file or book or anything that has all this funtions explained, or at least listed so i can learn a bit from there? And leave you in peace

You can get to the full help document with F1 inside Mp3Tag. Then click on "Scripting." You might also want to look at "Actions."

Wouldn't it be nice if an action could include a filter somewhat like a WHERE clause. I believe more people would use filters if they didn't have to be set up separately. Do you know if this idea has been discussed before?

AFAIK it has not been discussed before.
Perhaps, because everything is already there.
You have the filter which is pretty straightforward to apply.
You have the actions with a command language to cater for such restrictions.

You are more flexible if you stay modular and separate the retrieval and the editing from each other.
Otherwise you have to write a separate action for each "where" clause.
Or you have to open and edit the "where" clause which probably takes just as long as entering the filter.
Also, it may be puzzling that - with a "where" cluase in one of the actions - only some files get treated as you did not remember the restriction. The filter is more transparent in my opinion.

Beside the other proposals within this thread there is one more here ...

Action "Format value" Field: ALBUMARTIST Formatstring: $if2(%ALBUMARTIST%,%ARTIST%)


Good to know! It's counter-intuitive to think that a string can have a T/F value!