# replace with $if(....

**URL:** https://community.mp3tag.de/t/replace-with-if/10094
**Category:** Support
**Created:** [March 13, 2010, 9:40am UTC](https://community.mp3tag.de/t/replace-with-if/10094 "2010-03-13T09:40:09Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![db2p](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/a5b964/32.png) [@db2p](https://community.mp3tag.de/u/db2p)
#### Post date: [March 13, 2010, 9:40am UTC](https://community.mp3tag.de/t/replace-with-if/10094/1 "2010-03-13T09:40:09Z")

</div>

hi from france to everybody

i would like to replace one or several fields with a condition depending of another field.  
like:

if the artist is VNV NATION i would like to write Ronan HARRIS in the composer field and future-Pop in the genre field....

i do it like this:

Action: format value  
field: composer  
format: $if(%artist%=VNV NATION,Ronan HARRIS,%artist%)

but it doesn't work because of changing field from another band is not vnv nation....

thanks for your answer

---

<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: [March 13, 2010, 10:23am UTC](https://community.mp3tag.de/t/replace-with-if/10094/2 "2010-03-13T10:23:28Z")

</div>

> [@db2p](#):
>
> ... i do it like this:  
> Action: format value  
> field: composer  
> format: $if(%artist%=VNV NATION,Ronan HARRIS,%artist%)  
> but it doesn't work ...

Please have a look into Mp3tag scripting function help section and find out the fitting functions to use, especially have a closer look at the comparison operator you've used.

DD.20100313.1223.CET

---

<div class="post-metadata">

### Author: ![db2p](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/a5b964/32.png) [@db2p](https://community.mp3tag.de/u/db2p)
#### Post date: [March 13, 2010, 10:36am UTC](https://community.mp3tag.de/t/replace-with-if/10094/3 "2010-03-13T10:36:28Z")

</div>

> [@DetlevD](#):
>
> Please have a look into Mp3tag scripting function help section and find out the fitting functions to use, especially have a closer look at the comparison operator you've used.
> 
> DD.20100313.1223.CET

sorry but i don't see the error i make in this function so please help me...thanks

---

<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: [March 13, 2010, 12:47pm UTC](https://community.mp3tag.de/t/replace-with-if/10094/4 "2010-03-13T12:47:18Z")

</div>

> [@db2p](#):
>
> sorry but i don't see the error i make in this function so please help me...thanks

Is there any comparator sign like "=", "==", "\<\>", "!=", "\>", "\<", "\>=", "\<=", "=\<" or such alike anywhere described in the manual topic of Mp3tag scripting functions?

DD.20100313.1446.CET

---

<div class="post-metadata">

### Author: ![db2p](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/a5b964/32.png) [@db2p](https://community.mp3tag.de/u/db2p)
#### Post date: [March 13, 2010, 2:58pm UTC](https://community.mp3tag.de/t/replace-with-if/10094/5 "2010-03-13T14:58:41Z")

</div>

> [@DetlevD](#):
>
> Is there any comparator sign like "=", "==", "\<\>", "!=", "\>", "\<", "\>=", "\<=", "=\<" or such alike anywhere described in the manual topic of Mp3tag scripting functions?
> 
> DD.20100313.1446.CET

thank you to have show me the right way. now it works with:

$if($eql(%artist%,VNV NATION),Ronan HARRIS,%artist%)

for me it's like basic so i use always the equal sign but in this case i have to do not..

---

<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: [March 13, 2010, 3:52pm UTC](https://community.mp3tag.de/t/replace-with-if/10094/6 "2010-03-13T15:52:44Z")

</div>

> [@db2p](#):
>
> thank you to have show me the right way. now it works with: $if($eql(%artist%,VNV NATION),Ronan HARRIS,%artist%) ...

Ok, you got it! Have fun with Mp3tag.

DD.20100313.1752.CET

---

<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:22pm UTC](https://community.mp3tag.de/t/replace-with-if/10094/7 "2026-02-09T12:22:14Z")

</div>


