# $if2 "true"

**URL:** https://community.mp3tag.de/t/if2-true/8282
**Category:** Support
**Created:** [April 23, 2009, 8:46am UTC](https://community.mp3tag.de/t/if2-true/8282 "2009-04-23T08:46:39Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [April 23, 2009, 8:46am UTC](https://community.mp3tag.de/t/if2-true/8282/1 "2009-04-23T08:46:39Z")

</div>

In

> [@](#):
>
> $if2(x,y) if x is true, x is returned, otherwise y.

what values count as "true"?

Thanks.

---

<div class="post-metadata">

### Author: ![drbeachboy](https://community.mp3tag.de/user_avatar/community.mp3tag.de/drbeachboy/32/94_2.png) [@drbeachboy](https://community.mp3tag.de/u/drbeachboy)
#### Post date: [April 23, 2009, 2:12pm UTC](https://community.mp3tag.de/t/if2-true/8282/2 "2009-04-23T14:12:26Z")

</div>

Really, any tag name.

i.e. $if2(%album artist%,%artist%)

Returns "album artist" if it is present in the tag, otherwise returns "artist".

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [April 23, 2009, 2:37pm UTC](https://community.mp3tag.de/t/if2-true/8282/3 "2009-04-23T14:37:27Z")

</div>

Thanks, but I find truth is not confined to tag names.

I suspect true is any non-null value, but would like confirmation.

---

<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: [April 23, 2009, 2:44pm UTC](https://community.mp3tag.de/t/if2-true/8282/4 "2009-04-23T14:44:28Z")

</div>

> [@drbeachboy](#):
>
> ...Really, any tag name.

No, it is not the tag name but the tag content that must exist to be evaluated as TRUE by $if2().  
If you think of the tag name, then you would code $if2(ARTIST, ...)

DD.20090423.1844.CEST

---

<div class="post-metadata">

### Author: ![drbeachboy](https://community.mp3tag.de/user_avatar/community.mp3tag.de/drbeachboy/32/94_2.png) [@drbeachboy](https://community.mp3tag.de/u/drbeachboy)
#### Post date: [April 23, 2009, 6:05pm UTC](https://community.mp3tag.de/t/if2-true/8282/5 "2009-04-23T18:05:15Z")

</div>

Understood, but I did say

> [@](#):
>
> Returns "album artist" if it is present in the tag, otherwise returns "artist".

with "it" meaning "content".

---

<div class="post-metadata">

### Author: ![drbeachboy](https://community.mp3tag.de/user_avatar/community.mp3tag.de/drbeachboy/32/94_2.png) [@drbeachboy](https://community.mp3tag.de/u/drbeachboy)
#### Post date: [April 23, 2009, 6:10pm UTC](https://community.mp3tag.de/t/if2-true/8282/6 "2009-04-23T18:10:38Z")

</div>

> [@](#):
>
> I suspect true is any non-null value, but would like confirmation.

I believe your statement is correct, but it does have to be value supported in Tagz.

---

<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:21pm UTC](https://community.mp3tag.de/t/if2-true/8282/7 "2026-02-09T12:21:30Z")

</div>


