# Convert tag values and add a leading zero

**URL:** <https://community.mp3tag.de/t/convert-tag-values-and-add-a-leading-zero/44682>\
**Category:** Support\
**Created:** [February 28, 2019, 10:13pm UTC](https://community.mp3tag.de/t/convert-tag-values-and-add-a-leading-zero/44682 "2019-02-28T22:13:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![waterfall](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/53a042/32.png) [@waterfall](https://community.mp3tag.de/u/waterfall)\
**Post date:** [February 28, 2019, 10:13pm UTC](https://community.mp3tag.de/t/convert-tag-values-and-add-a-leading-zero/44682/1 "2019-02-28T22:13:56Z")

</div>

Hi, would like to ask for some kind assistance with the following query.

Want to convert values from one field to the next adding a leading zero unless the number begins with a 1. For example:

1A = 01A  
5B = 05B  
7A = 07A  
10B = 10B  
12A = 12A

Need some logic in an expression to determine to add a zero if the value does not start with a 1, else copy the value as it.

The stumbling block here is thats it alphanumeric value..

Thank you in advance 🙂

---

<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:** [March 1, 2019, 6:01am UTC](https://community.mp3tag.de/t/convert-tag-values-and-add-a-leading-zero/44682/2 "2019-03-01T06:01:23Z")

</div>

You could try an action of the type "Format value" for TRACK  
Format string: `$if($eql($len(%track%),2),0%track%,%track%)`

---

<div class="post-metadata">

**Author:** ![waterfall](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/53a042/32.png) [@waterfall](https://community.mp3tag.de/u/waterfall)\
**Post date:** [March 1, 2019, 10:46am UTC](https://community.mp3tag.de/t/convert-tag-values-and-add-a-leading-zero/44682/3 "2019-03-01T10:46:45Z")

</div>

This looks perfect, thank you, ohrenkino - excellent stuff 🙂

---

<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/convert-tag-values-and-add-a-leading-zero/44682/4 "2026-02-09T12:27:57Z")

</div>


