# IF( \<actions\> )

**URL:** <https://community.mp3tag.de/t/if-actions/8528>\
**Category:** Support\
**Created:** [June 29, 2009, 8:27am UTC](https://community.mp3tag.de/t/if-actions/8528 "2009-06-29T08:27:03Z")\
**Posts on this page:** 6\
**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:** [June 29, 2009, 8:27am UTC](https://community.mp3tag.de/t/if-actions/8528/1 "2009-06-29T08:27:03Z")

</div>

My Action Group has a block of Actions that I want done only if a certain tag is present (non-empty). How best to code this? Thanks.

---

<div class="post-metadata">

**Author:** ![JJ\_Johnson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/jj_johnson/32/67_2.png) [@JJ\_Johnson](https://community.mp3tag.de/u/JJ_Johnson)\
**Post date:** [June 30, 2009, 6:40pm UTC](https://community.mp3tag.de/t/if-actions/8528/2 "2009-06-30T18:40:56Z")

</div>

Good question. I've thought about this also and don't have a good way of doing it.

A nice Mp3tag enhancement would be a new action type of 'Exit action group', where you enter an expression to be evaluated. If it evaluates to positive, then the remaining actions in the group would be skipped.

_Action type:_ **Exit action group**  
_Conditional:_ **$neq(%myfield%,1)**

BTW, what is the best way to test for the _existence_ of a field?

---

<div class="post-metadata">

**Author:** ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)\
**Post date:** [June 30, 2009, 6:51pm UTC](https://community.mp3tag.de/t/if-actions/8528/3 "2009-06-30T18:51:56Z")

</div>

> [@](#):
>
> BTW, what is the best way to test for the _existence_ of a field?

$if(%field%,y,n)

---

<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:** [June 30, 2009, 6:56pm UTC](https://community.mp3tag.de/t/if-actions/8528/4 "2009-06-30T18:56:06Z")

</div>

> [@dano](#):
>
> $if(%field%,y,n)

Surely that gives a false negative on an empty field.

---

<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:** [October 15, 2023, 9:54pm UTC](https://community.mp3tag.de/t/if-actions/8528/5 "2023-10-15T21:54:29Z")

</div>

2 posts were split to a new topic: [Scripting $neql not working in actions?](https://community.mp3tag.de/t/scripting-neql-not-working-in-actions/62424)

---

<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:** [November 14, 2023, 9:55pm UTC](https://community.mp3tag.de/t/if-actions/8528/6 "2023-11-14T21:55:00Z")

</div>

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