# Share your custom Actions

**URL:** https://community.mp3tag.de/t/share-your-custom-actions/1722
**Category:** General Discussion
**Created:** [February 21, 2005, 2:01am UTC](https://community.mp3tag.de/t/share-your-custom-actions/1722 "2005-02-21T02:01:42Z")
**Posts on this page:** 1
**Showing post:** 33

<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: [April 12, 2011, 2:26am UTC](https://community.mp3tag.de/t/share-your-custom-actions/1722/33 "2011-04-12T02:26:02Z")

</div>

Here is a 'Format value' action, which set up a tag-field FILENAME\_NEW from tag-fields TRACK, ARTIST, ALBUM, TITLE in a dynamically way.  
A not existing tag-field will not be used to create the new filename.  
At least one of those tag-fields should be exist, otherwise the new filename will be empty, that means, FILENAME\_NEW will not be created.

The action formatstring uses the '**[...]** square bracket clamb' operator to check the existence of a tag-field and the ' **$trimLeft**' function to remove unwanted leading space and hyphen characters.

_Actiontype 5:_ **Format value**  
_Field:_ **FILENAME\_NEW**  
_Formatstring:_

**$trimLeft([$num(%TRACK%,2)][' - '%ARTIST%][' - '%ALBUM%][' - '%TITLE%],' -')**

The result can vary ...  
01  
01 - album  
01 - album - title  
01 - artist  
01 - artist - album  
01 - artist - album - title  
01 - artist - title  
01 - title  
album  
album - title  
artist  
artist - album  
artist - album - title  
artist - title  
title

The following modified Formatstring creates a value even when all given tag-fields are empty ...

**$if2($trimLeft([$num(%TRACK%,2)][' - '%ARTIST%][' - '%ALBUM%][' - '%TITLE%],' -'),$num(%\_counter%,2)' - Unknown')**

DD.20110412.1006.CEST

---

_[View the full topic](https://community.mp3tag.de/t/share-your-custom-actions/1722)._
