# Can not get a blank result in $if $eql statement

**URL:** <https://community.mp3tag.de/t/can-not-get-a-blank-result-in-if-eql-statement/47788>\
**Category:** Support\
**Created:** [February 6, 2020, 8:48am UTC](https://community.mp3tag.de/t/can-not-get-a-blank-result-in-if-eql-statement/47788 "2020-02-06T08:48:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![djdizzle](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/ed8c4c/32.png) [@djdizzle](https://community.mp3tag.de/u/djdizzle)\
**Post date:** [February 6, 2020, 8:48am UTC](https://community.mp3tag.de/t/can-not-get-a-blank-result-in-if-eql-statement/47788/1 "2020-02-06T08:48:50Z")

</div>

_Format Value:_  
`CONTENTGROUP`  
`$if($eql(%itunesadvisory%,1),Explicit,%contentgroup%),$if($eql(%itunesadvisory%,2),Clean,%contentgroup%),$if($eql(%itunesadvisory%,0), ,%contentgroup%)`

Desired outcomes:  
`CONTENTGROUP`  
`Explicit`, `Clean`, `*blank*`

I can't seem to get the `$if($eql(%itunesadvisory%,0), ,%contentgroup%)` to work.  
No matter what I try, even if I leave that if statement off, I can't get a blank result in `CONTENTGROUP`. I get `,, `, `,,`

> With _Format Value_:  
> `CONTENTGROUP`  
> `$if($eql(%itunesadvisory%,1),Explicit,%contentgroup%),$if($eql(%itunesadvisory%,2),Clean,%contentgroup%)`
> 
> Result `CONTENTGROUP`:  
> `,`

> With _Format Value_:  
> `CONTENTGROUP`  
> `$if($eql(%itunesadvisory%,1),Explicit,%contentgroup%),$if($eql(%itunesadvisory%,2),Clean,%contentgroup%),$if($eql(%itunesadvisory%,0),,%contentgroup%)`
> 
> Result `CONTENTGROUP`:  
> `,,`

---

<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:** [February 6, 2020, 9:45am UTC](https://community.mp3tag.de/t/can-not-get-a-blank-result-in-if-eql-statement/47788/2 "2020-02-06T09:45:39Z")

</div>

> [@djdizzle](#):
>
> Desired outcomes:  
> `CONTENTGROUP`  
> `Explicit` , `Clean` , `*blank*`

If you check ITUNESADVISORY then I doubt that it can have 2 (or even 3) values at the same time.  
First check is ITUNESADVISORY = 1 results in "Explicit" - the second and third condition will produce that what is already in CONTENTGROUP plus the commas.  
-\> Explicit,,  
Second check is ITUNESADVISORY = 2 results in "Clean" - the first and third condition will produce that what is already in CONTENTGROUP plus a leading comma.  
-\>,Clean,  
The third check is ITUNESADVISORY = 0 results in " " - the first and second condition will produce that what is already in CONTENTGROUP plus commas.  
-\>,,\_  
All together: this will never lead to

> [@djdizzle](#):
>
> Desired outcomes:  
> `CONTENTGROUP`  
> `Explicit` , `Clean` , `*blank*`

Perhaps you have to include the comma in the result string, e.g.  
`$if($eql(%itunesadvisory%,1),"Explicit,",%contentgroup%)`  
but as only one condition of the 3 will lead to a positive result, I doubt that you need the comma at all, you will not get a list that needs to be separated.

---

<div class="post-metadata">

**Author:** ![djdizzle](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/ed8c4c/32.png) [@djdizzle](https://community.mp3tag.de/u/djdizzle)\
**Post date:** [February 6, 2020, 10:28am UTC](https://community.mp3tag.de/t/can-not-get-a-blank-result-in-if-eql-statement/47788/3 "2020-02-06T10:28:43Z")

</div>

I think I need to clarify.

`ITUNESADVISORY` can only have one value `0`,`1` or `2`.  
Therefore, `CONTENTGROUP` should only have one value `Clean`, `Explicit` or `no value`. And should not append any other values.

I hope this is more helpful.

---

<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:** [February 6, 2020, 10:44am UTC](https://community.mp3tag.de/t/can-not-get-a-blank-result-in-if-eql-statement/47788/4 "2020-02-06T10:44:34Z")

</div>

You can type all $if()-clauses behind each other, no need to use a separating comma.

---

<div class="post-metadata">

**Author:** ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)\
**Post date:** [February 6, 2020, 11:45am UTC](https://community.mp3tag.de/t/can-not-get-a-blank-result-in-if-eql-statement/47788/5 "2020-02-06T11:45:25Z")

</div>

> [@djdizzle](#):
>
> `ITUNESADVISORY` can only have one value `0` , `1` or `2` .  
> Therefore, `CONTENTGROUP` should only have one value `Clean` , `Explicit` or `no value` . And should not append any other values.

Try this:  
`$if($eql(%itunesadvisory%,1),Explicit,$if($eql(%itunesadvisory%,2),Clean,))`

---

<div class="post-metadata">

**Author:** ![djdizzle](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/ed8c4c/32.png) [@djdizzle](https://community.mp3tag.de/u/djdizzle)\
**Post date:** [February 6, 2020, 1:10pm UTC](https://community.mp3tag.de/t/can-not-get-a-blank-result-in-if-eql-statement/47788/6 "2020-02-06T13:10:50Z")

</div>

Thankyou. This worked perfectally!  
😁

---

<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:** [March 7, 2020, 1:20pm UTC](https://community.mp3tag.de/t/can-not-get-a-blank-result-in-if-eql-statement/47788/7 "2020-03-07T13:20:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
