# Changing text in one field if another contains certain phrase or number

**URL:** <https://community.mp3tag.de/t/changing-text-in-one-field-if-another-contains-certain-phrase-or-number/15719>\
**Category:** Support\
**Created:** [May 6, 2014, 6:42am UTC](https://community.mp3tag.de/t/changing-text-in-one-field-if-another-contains-certain-phrase-or-number/15719 "2014-05-06T06:42:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guttersnipe](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ebca7d/32.png) [@Guttersnipe](https://community.mp3tag.de/u/Guttersnipe)\
**Post date:** [May 6, 2014, 6:42am UTC](https://community.mp3tag.de/t/changing-text-in-one-field-if-another-contains-certain-phrase-or-number/15719/1 "2014-05-06T06:42:09Z")

</div>

I looking for a way to make an IF statement of sorts when tagging  
Want it so IF Compilation field = 1 THEN AlbumArtist = #Various Artists#

Is this possible?

Cheers in advance

Guttersnipe

---

<div class="post-metadata">

**Author:** ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)\
**Post date:** [May 6, 2014, 7:02pm UTC](https://community.mp3tag.de/t/changing-text-in-one-field-if-another-contains-certain-phrase-or-number/15719/2 "2014-05-06T19:02:02Z")

</div>

Just replace VA with what you need (I think it's #Various Artists#): Why do you need the # at the end?

Use format in tag-tag for single use or create an action with format:  
**Field:** ALBUMARTIST  
**Format string:** $if($eql(%compilation%,1),VA,)

**NB:** This leaves the ALBUM ARTIST field empty if COMPILATION value is not 1.

To get around that use:  
**Field:** ALBUMARTIST  
**Format string:** $if($eql(%compilation%,1),VA,%albumartist%)

---

<div class="post-metadata">

**Author:** ![Guttersnipe](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ebca7d/32.png) [@Guttersnipe](https://community.mp3tag.de/u/Guttersnipe)\
**Post date:** [May 6, 2014, 10:20pm UTC](https://community.mp3tag.de/t/changing-text-in-one-field-if-another-contains-certain-phrase-or-number/15719/3 "2014-05-06T22:20:53Z")

</div>

> [@stevehero](#):
>
> Just replace VA with what you need (I think it's #Various Artists#): Why do you need the # at the end?
> 
> Use format in tag-tag for single use or create an action with format:  
> **Field:** ALBUMARTIST  
> **Format string:** $if($eql(%compilation%,1),VA,)
> 
> **NB:** This leaves the ALBUM ARTIST field empty if COMPILATION value is not 1.
> 
> To get around that use:  
> **Field:** ALBUMARTIST  
> **Format string:** $if($eql(%compilation%,1),VA,%albumartist%)

Sweet! I'll try that on the morrow. Let you know how it turns out.

---

<div class="post-metadata">

**Author:** ![Guttersnipe](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ebca7d/32.png) [@Guttersnipe](https://community.mp3tag.de/u/Guttersnipe)\
**Post date:** [May 7, 2014, 11:32am UTC](https://community.mp3tag.de/t/changing-text-in-one-field-if-another-contains-certain-phrase-or-number/15719/4 "2014-05-07T11:32:00Z")

</div>

> [@stevehero](#):
>
> Just replace VA with what you need (I think it's #Various Artists#): Why do you need the # at the end?
> 
> Use format in tag-tag for single use or create an action with format:  
> **Field:** ALBUMARTIST  
> **Format string:** $if($eql(%compilation%,1),VA,)
> 
> **NB:** This leaves the ALBUM ARTIST field empty if COMPILATION value is not 1.
> 
> To get around that use:  
> **Field:** ALBUMARTIST  
> **Format string:** $if($eql(%compilation%,1),VA,%albumartist%)

To answer your earlier question, I have the second # there for nothing other than aesthetics 😉

Your string worked for me with some slight tweaking...

$if($eql(%compilation%,1),#Various Artists#,%artist%)

Thanks for this,

Guttersnipe

---

<div class="post-metadata">

**Author:** ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)\
**Post date:** [May 7, 2014, 5:14pm UTC](https://community.mp3tag.de/t/changing-text-in-one-field-if-another-contains-certain-phrase-or-number/15719/5 "2014-05-07T17:14:16Z")

</div>

> [@Guttersnipe](#):
>
> To answer your earlier question, I have the second # there for nothing other than aesthetics 😉

Oh, just thought it might not sort how you want it in your music player. No problem.

---

<div class="post-metadata">

**Author:** ![Guttersnipe](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ebca7d/32.png) [@Guttersnipe](https://community.mp3tag.de/u/Guttersnipe)\
**Post date:** [May 7, 2014, 5:41pm UTC](https://community.mp3tag.de/t/changing-text-in-one-field-if-another-contains-certain-phrase-or-number/15719/6 "2014-05-07T17:41:52Z")

</div>

> [@stevehero](#):
>
> Oh, just thought it might not sort how you want it in your music player. No problem.

Its more for when sorting on my machine. keeps all the compilations together at he top of the list.

---

<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:** [November 28, 2014, 7:36am UTC](https://community.mp3tag.de/t/changing-text-in-one-field-if-another-contains-certain-phrase-or-number/15719/7 "2014-11-28T07:36:56Z")

</div>

> [@stevehero](#):
>
> Just replace VA with what you need (I think it's #Various Artists#): Why do you need the # at the end?
> 
> Use format in tag-tag for single use or create an action with format:  
> **Field:** ALBUMARTIST  
> **Format string:** $if($eql(%compilation%,1),VA,)
> 
> **NB:** This leaves the ALBUM ARTIST field empty if COMPILATION value is not 1.
> 
> To get around that use:  
> **Field:** ALBUMARTIST  
> **Format string:** $if($eql(%compilation%,1),VA,%albumartist%)

Could that be modified to something like...  
IF %title% contains (feat. \*) or [feat. \*] then move and append the 'feat. \*' minus the () or to %artist%

Also...

IF %title% contains (\* Remix|Mix|Edit|Version|Dub) or [\* Remix|Mix|Edit|Version|Dub] then change () or to «» and copy the contents of «» to %subtitle%

- denotes a wildcard expression, in this case, the name of the version eg. Radio Edit or Extended Version... and. can contain one or more words.

---

<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:** [November 28, 2014, 8:29am UTC](https://community.mp3tag.de/t/changing-text-in-one-field-if-another-contains-certain-phrase-or-number/15719/8 "2014-11-28T08:29:00Z")

</div>

> [@DJ Dizzle](#):
>
> Could that be modified to something like...  
> IF %title% contains (feat. \*) or [feat. \*] then move and append the 'feat. \*' minus the () or to %artist%  
> ...

If you are sure that the brackets always enclose the wanted text and are not used for something else, you may create an action group with these action:  
one of the type "Guess value" (import tag field) for TITLE  
Enter as guessing pattern: %title% (feat. %feat\_artist%)  
one of the type "Guess value" (import tag field) for TITLE  
Enter as guessing pattern: %title% [feat. %feat\_artist%]  
now one of the type "Format tag field" for ARTIST  
Enter as format string: %artist% feat. %feat\_artist%  
and finally "Remove tag field" for FEAT\_ARTIST

You should think about using a filter to group the data.

---

<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:** [November 29, 2014, 12:29am UTC](https://community.mp3tag.de/t/changing-text-in-one-field-if-another-contains-certain-phrase-or-number/15719/9 "2014-11-29T00:29:38Z")

</div>

> [@ohrenkino](#):
>
> If you are sure that the brackets always enclose the wanted text and are not used for something else, you may create an action group with these action:  
> one of the type "Guess value" (import tag field) for TITLE  
> Enter as guessing pattern: %title% (feat. %feat\_artist%)  
> one of the type "Guess value" (import tag field) for TITLE  
> Enter as guessing pattern: %title% [feat. %feat\_artist%]  
> now one of the type "Format tag field" for ARTIST  
> Enter as format string: %artist% feat. %feat\_artist%  
> and finally "Remove tag field" for FEAT\_ARTIST
> 
> You should think about using a filter to group the data.

THat is working except, when the TITLE contains "Clarity (feat. Foxes) [Zedd Union Mix]", the ARTIST results in "Zedd feat. "

---

<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:** [November 29, 2014, 10:28am UTC](https://community.mp3tag.de/t/changing-text-in-one-field-if-another-contains-certain-phrase-or-number/15719/10 "2014-11-29T10:28:38Z")

</div>

> [@DJ Dizzle](#):
>
> THat is working except, when the TITLE contains "Clarity (feat. Foxes) [Zedd Union Mix]", the ARTIST results in "Zedd feat. "

Then you must have done something wrong as that pattern is not matched by any of the "Import tag field" actions. So the field feat\_artist will not be created.

---

<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/changing-text-in-one-field-if-another-contains-certain-phrase-or-number/15719/11 "2026-02-09T12:25:02Z")

</div>

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


