# User-defined variables

**URL:** <https://community.mp3tag.de/t/user-defined-variables/14637>\
**Category:** Support\
**Created:** [April 14, 2013, 8:37am UTC](https://community.mp3tag.de/t/user-defined-variables/14637 "2013-04-14T08:37:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![avecchia](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/5fc32e/32.png) [@avecchia](https://community.mp3tag.de/u/avecchia)\
**Post date:** [April 14, 2013, 8:37am UTC](https://community.mp3tag.de/t/user-defined-variables/14637/1 "2013-04-14T08:37:30Z")

</div>

Hi, I'm trying to export a list (in txt format) of the tracks in an album of classical music that has multiple composers and multiple interpreters.

In order to get this result, I need to use some user-defined variables, e.g. %lastcomposer% and %lastartist% which should store the last values read from the fields %compser% and %artist% respectively.

However when I tested them with the following code

$puts(%lastcomposer%,aaa)  
Last composer=$get(%lastcomposer%)  
Last artist =$get(%lastartist%)$puts(%lastartist%,bbb)  
Last composer=$get(%lastcomposer%)  
Last artist =$get(%lastartist%)

this is what I obtained:

Last composer=aaa  
Last artist =aaa  
Last composer=bbb  
Last artist =bbb

That is, it seems that only one user-defined variable is allowed, in the sense that the last one which is set overwrites also all the others. Is my interpretation correct or rather, I'm doing something wrong?

Thanks in advance for any help/suggestion.

Alberto

---

<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:** [April 14, 2013, 3:54pm UTC](https://community.mp3tag.de/t/user-defined-variables/14637/2 "2013-04-14T15:54:17Z")

</div>

You should name your variables without % signs.

---

<div class="post-metadata">

**Author:** ![avecchia](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/5fc32e/32.png) [@avecchia](https://community.mp3tag.de/u/avecchia)\
**Post date:** [April 15, 2013, 7:21am UTC](https://community.mp3tag.de/t/user-defined-variables/14637/3 "2013-04-15T07:21:35Z")

</div>

Thanks, it worked!

Alberto

---

<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:24pm UTC](https://community.mp3tag.de/t/user-defined-variables/14637/4 "2026-02-09T12:24:26Z")

</div>

Closed on February 9, 2026, 12:24pm UTC


