# Edit tag if existing

**URL:** <https://community.mp3tag.de/t/edit-tag-if-existing/42440>\
**Category:** Support\
**Created:** [July 23, 2018, 9:38pm UTC](https://community.mp3tag.de/t/edit-tag-if-existing/42440 "2018-07-23T21:38:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zontir](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zontir/32/473_2.png) [@Zontir](https://community.mp3tag.de/u/Zontir)\
**Post date:** [July 23, 2018, 9:38pm UTC](https://community.mp3tag.de/t/edit-tag-if-existing/42440/1 "2018-07-23T21:38:14Z")

</div>

Hi, there,  
I'm trying to edit a tag that exists only in certain tracks with actions. However, if I do it with "Format value" it adds the same tag to files that do not contain it.

Now I would like to edit the tag without adding it to the files that don't have it.

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [July 24, 2018, 4:45am UTC](https://community.mp3tag.de/t/edit-tag-if-existing/42440/2 "2018-07-24T04:45:40Z")

</div>

Filter the files that have the special tag before.  
i.e  
`%tagname% PRESENT`  
or add a filter to the format-value-action  
`if$(%tagname%,your content,)`

---

<div class="post-metadata">

**Author:** ![Zontir](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zontir/32/473_2.png) [@Zontir](https://community.mp3tag.de/u/Zontir)\
**Post date:** [July 24, 2018, 5:03am UTC](https://community.mp3tag.de/t/edit-tag-if-existing/42440/3 "2018-07-24T05:03:47Z")

</div>

> [@poster](#):
>
> or add a filter to the format-value-action

How do I do that?  
I'm new at this condition thing.  
Can it be placed in an action?

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [July 24, 2018, 5:06am UTC](https://community.mp3tag.de/t/edit-tag-if-existing/42440/4 "2018-07-24T05:06:08Z")

</div>

> [@Zontir](#):
>
> How do I do that?  
> I'm new at this condition thing.  
> Can it be placed in an action?

Just take  
`$if(%tagname%,your content,)`  
as your format string in the action.

Edit:  
Corrected type error: i`f$ to $if`

---

<div class="post-metadata">

**Author:** ![Zontir](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zontir/32/473_2.png) [@Zontir](https://community.mp3tag.de/u/Zontir)\
**Post date:** [July 24, 2018, 5:24am UTC](https://community.mp3tag.de/t/edit-tag-if-existing/42440/5 "2018-07-24T05:24:17Z")

</div>

> [@poster](#):
>
> as your format string in the action.

You mean something like that?  
 ![Screenshot_3](https://community.mp3tag.de/uploads/default/original/2X/9/9a053c23fbb241bd69b8dc2700943fbd7e44c3fd.png)

obviously replacing by the corresponding label

Trying it that way removes the tag, i.e. it returns z

Edit: If it works, it's perfect. Just what I wanted.

MP3Tag is great.

Thanks you @poster \<3

---

<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:27pm UTC](https://community.mp3tag.de/t/edit-tag-if-existing/42440/6 "2026-02-09T12:27:34Z")

</div>


