# Preventing empty output lines in export

**URL:** <https://community.mp3tag.de/t/preventing-empty-output-lines-in-export/17746>\
**Category:** Support\
**Created:** [March 13, 2016, 9:27pm UTC](https://community.mp3tag.de/t/preventing-empty-output-lines-in-export/17746 "2016-03-13T21:27:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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 14, 2016, 8:12am UTC](https://community.mp3tag.de/t/preventing-empty-output-lines-in-export/17746/2 "2016-03-14T08:12:32Z")

</div>

> [@just\_Addict](#):
>
> I've defined an mte export and read in the online help and also observed this in action that if you enclose a tag frame variable within right-angled brackets '[' and ']', it will not generate blank output if there is no value for the given tag frame variable. ...  
> To my surprise the suppression of blank output then fails and outputs the line as if a value was present ...

Yes, in Mp3tag scripting language the [...] square bracket clamp is an operator.  
Once there is any tagfield content operator within the square bracket clamp, e. g. %TITLE%, which owns a value, then the entire content of the square bracket clamp will be come into usage.

This scripting line ...

**[PERFORMER "$if(%ALBUMARTIST%,%ARTIST%,)"]**

... or written as ...

**['PERFORMER "'$if(%ALBUMARTIST%,%ARTIST%,)'"']**

... has the meaning of ...  
"If ALBUMARTIST exists, then write ARTIST, else write nothing."

If ALBUMARTIST does not exist, but ARTIST exist, then the result is the text:

**'PERFORMER ""'**

Probably you want this expression ...

**['PERFORMER "'$if2(%ALBUMARTIST%,%ARTIST%)'"']**

... with the meaning of ...  
"If both tagfields do not exist, then the result is an empty string."

DD.20160314.1042.CET

---

_[View the full topic](https://community.mp3tag.de/t/preventing-empty-output-lines-in-export/17746)._
