# ALBUMARTIST if ARTIST

**URL:** <https://community.mp3tag.de/t/albumartist-if-artist/17047>\
**Category:** Support\
**Created:** [July 12, 2015, 1:56pm UTC](https://community.mp3tag.de/t/albumartist-if-artist/17047 "2015-07-12T13:56:48Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [July 12, 2015, 1:56pm UTC](https://community.mp3tag.de/t/albumartist-if-artist/17047/1 "2015-07-12T13:56:48Z")

</div>

I would like to know, how to make a way to distinct certain files:

those that have no value in ALBUMARTIST if there is anything in the ALBUM field; and thus ignoring cases where ALBUM is also empty

Now I have this code used as a column  
$if($lower($left(%ALBUM%,_),$lower($left(%ALBUMARTIST%,_))),'OK','ERROR')but that doesn't work properly

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [July 12, 2015, 2:04pm UTC](https://community.mp3tag.de/t/albumartist-if-artist/17047/2 "2015-07-12T14:04:41Z")

</div>

> [@zerow](#):
>
> ...$left(%ALBUM%,\*)..

Please check out the syntax descriptions: this is invalid syntax for $left():  
"$left(x,n) returns the leftmost n characters of string x"

The \* is no numeric value to define the length of the string.

Why don't you use a filter:  
%album% MISSING AND %albumartist% MISSING

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [July 12, 2015, 2:21pm UTC](https://community.mp3tag.de/t/albumartist-if-artist/17047/3 "2015-07-12T14:21:10Z")

</div>

> [@zerow](#):
>
> I would like to know, how to make a way to distinct certain files: those that have no value in ALBUMARTIST if there is anything in the ALBUM field; and thus ignoring cases where ALBUM is also empty. Now I have this code used as a column
> 
> ```
> $if($lower($left(%ALBUM%,*),$lower($left(%ALBUMARTIST%,*))),'OK','ERROR')but that doesn't work properly
> 
> ```

The example formatstring does not follow the syntax for the applied Mp3tag functions.

Try this ... for no value in ALBUMARTIST if there is anything in the ALBUM field ...

**$if($and($not(%ALBUMARTIST%),%ALBUM%),'\*',)**

Try this ... for no value in ALBUMARTIST if there is anything in the ALBUM field ... and thus ignoring cases where ALBUM is also empty ...

**$if($and($not(%ALBUMARTIST%),$not(%ALBUM%)),'\*',) ... or ... $if($not($or(%ALBUMARTIST%,%ALBUM%)),'\*',)**

DD.20150712.1821.CEST

---

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [July 12, 2015, 2:48pm UTC](https://community.mp3tag.de/t/albumartist-if-artist/17047/4 "2015-07-12T14:48:33Z")

</div>

> [@ohrenkino](#):
>
> Please check out the syntax descriptions: this is invalid syntax for $left():  
> "$left(x,n) returns the leftmost n characters of string x"
> 
> The \* is no numeric value to define the length of the string.
> 
> Why don't you use a filter:  
> %album% MISSING AND %albumartist% MISSING

First: I've made an mistake

ALBUMARTIST should be compared to ARTIST and not to ALBUM; but only when ALBUM is filled

Second: that shows not erroneous cases for me

What I would need is something like:  
**%albumartist% MISSING BUT ONLY IF %artist% IS NOT MISSING WHEN %album% IS PRESENT**

Third: filter is less usefull, because I cannot add it as a non removal position

I already have few of such codes that I keep in form of a separate column. And every column begins with ERROR [followed by explenation of what kind of error a given column shows]. This way I can load all of my files and every couple of weeks activate [show] those columns, to see if there are any common errors. This way is easy and not memory consuming

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [July 12, 2015, 3:08pm UTC](https://community.mp3tag.de/t/albumartist-if-artist/17047/5 "2015-07-12T15:08:53Z")

</div>

> [@zerow](#):
>
> ...  
> Second: that shows not erroneous cases for me
> 
> What I would need is something like:  
> **%albumartist% MISSING BUT ONLY IF %album% IS NOT MISSING**  
> Third: filter is less usefull, because I cannot add it as a non removal position  
> ..

It does show the errors as only the hits appear and they have show the error condition.  
The correct filter would be (please see also the syntax for filters: [https://docs.mp3tag.de/filter):](https://docs.mp3tag.de/filter):)  
%albumartist% MISSING AND NOT %album% MISSING

I think the filter is much more useful than any action that works in the obscurity with implicit conditions interwoven with complex other expressions.  
The filter gives you a fair overview of the files that match certain criteria.  
Scrolling through lists that show the word "error" all over the place hide information more than they make it obvious.  
Why pan through numerous screen pages to find (or miss) the odd one if the filter shows only the hits.

---

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [July 12, 2015, 3:22pm UTC](https://community.mp3tag.de/t/albumartist-if-artist/17047/6 "2015-07-12T15:22:56Z")

</div>

I've made an mistake: my concern is ARTIST, and not ALBUM

> [@DetlevD](#):
>
> The example formatstring does not follow the syntax for the applied Mp3tag functions.  
> Try this ... for no value in ALBUMARTIST if there is anything in the ALBUM field ...**$if($and($not(%ALBUMARTIST%),%ALBUM%),'\*',)**

This singles out a file with no value in one of two fields; this helps me to some extent

> [@DetlevD](#):
>
> Try this ... for no value in ALBUMARTIST if there is anything in the ALBUM field ... and thus ignoring cases where ALBUM is also empty ...**$if($and($not(%ALBUMARTIST%),$not(%ALBUM%)),'_',)... or ...$if($not($or(%ALBUMARTIST%,%ALBUM%)),'_****',)**  
> DD.20150712.1821.CEST

But these two codes indicate with \*only those cases, where both fields are empty; which for me is a one of two correct situations [and the other correct being having an empty ALBUMARTIST when ARTIST is filled when also ALBUM is not filled

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [July 12, 2015, 4:13pm UTC](https://community.mp3tag.de/t/albumartist-if-artist/17047/7 "2015-07-12T16:13:04Z")

</div>

> [@zerow](#):
>
> ... What I would need is something like:  
> **%albumartist% MISSING BUT ONLY IF %artist% IS NOT MISSING WHEN %album% IS PRESENT**

**"WHEN %album% IS PRESENT" ---\> $if(%ALBUM%,'then','else') "IF %artist% IS NOT MISSING" ---\> $if(%ARTIST%,'then','else') "%albumartist% MISSING BUT ONLY IF %artist% IS NOT MISSING WHEN %album% IS PRESENT" ---\> $if(%ALBUM%,$if(%ARTIST%,$if(%ALBUMARTIST%,'Albumartist exists', 'Albumartist missing'),'Artist missing'),'Album missing') ... or ... $if($and(%ALBUM%,%ARTIST%,%ALBUMARTIST%), 'Album and Artist and Albumartist exists','Missing Album or Artist or Albumartist')**

DD.20150712.2014.CEST

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [July 12, 2015, 4:24pm UTC](https://community.mp3tag.de/t/albumartist-if-artist/17047/8 "2015-07-12T16:24:49Z")

</div>

> [@zerow](#):
>
> This singles out a file with no value in one of two fields; this helps me to some extent ...

$if($and($not(%ALBUMARTIST%),%ALBUM%),'_',)  
... should be described as ...  
"In case of an existing ALBUM and a missing ALBUMARTIST, then write the character '_', otherwise write nothing."

DD.20150712.2024.CEST

---

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [July 13, 2015, 8:26am UTC](https://community.mp3tag.de/t/albumartist-if-artist/17047/9 "2015-07-13T08:26:34Z")

</div>

> [@DetlevD](#):
>
> [...]$if(%ALBUM%,$if(%ARTIST%,$if(%ALBUMARTIST%,'Albumartist exists','Albumartist missing'),'Artist missing'),'Album missing')[...]

This works better than I have imagined it could; because it says exactly what is missing and I need to use only one column for this

I only had to adjust the gradation of importance:  
1] ARTIST  
2] ALBUM  
3] ALBUM ARTIST

And so:

```
$if(%ARTIST%,$if(%ALBUM%,$if(%ALBUMARTIST%,'Albumartist exists','Albumartist missing'),'Album missing'),'Artist missing')

```

And here is a version even more adjusted to my likening $if(%ARTIST%,$if(%ALBUM%,$if(%ALBUMARTIST%,'+ OK +','- Album Artist'),'- Album'),'- Artist')

Thank you very much

---

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [July 13, 2015, 8:45am UTC](https://community.mp3tag.de/t/albumartist-if-artist/17047/10 "2015-07-13T08:45:56Z")

</div>

> [@ohrenkino](#):
>
> [...]  
> I think the filter is much more useful than any action that works in the obscurity with implicit conditions interwoven with complex other expressions.  
> [...]

I can see that filters can be a much powerful toll- when combined with such per-defined complex columns,; working together as a combo

> [@ohrenkino](#):
>
> [...]  
> Scrolling through lists that show the word "error" all over the place hide information more than they make it obvious.  
> Why pan through numerous screen pages to find (or miss) the odd one if the filter shows only the hits.

I rather do not have the need to scroll. If one of mine columns show me an ERROR indicator then I just deal with it. And to see them at the top or bottom all I have to do is to click to rearrange the list

Although, as for now, I have that one ERROR situation that pops out in form of multi screens of files, when they are not really being an erroneous- and I have to scroll through them. I that's where I can put to practice an additional filter, making a combo search

Than you for the insight

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [July 13, 2015, 12:45pm UTC](https://community.mp3tag.de/t/albumartist-if-artist/17047/11 "2015-07-13T12:45:34Z")

</div>

> [@zerow](#):
>
> ...  
> I only had to adjust the gradation of importance:  
> 1] ARTIST  
> 2] ALBUM  
> 3] ALBUM ARTIST  
> ...

In the filter you could evaluate criteria in a certain sequence if you enclose the crieteria in parenthesis:

(%artist% MISSING OR %albumartist% MISSING) AND %album% PRESENT

should show all files where either ARTIST or ALBUMARTIST is empty but ALBUM has data.

---

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [July 25, 2015, 1:06pm UTC](https://community.mp3tag.de/t/albumartist-if-artist/17047/12 "2015-07-25T13:06:26Z")

</div>

> [@ohrenkino](#):
>
> In the filter you could evaluate criteria in a certain sequence if you enclose the crieteria in parenthesis:  
> [...]

Yes, that is also a way to do it

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [February 9, 2026, 12:25pm UTC](https://community.mp3tag.de/t/albumartist-if-artist/17047/13 "2026-02-09T12:25:45Z")

</div>

Closed on February 9, 2026, 12:25pm UTC


