# Simple question: Add preceding zeros in expression language

**URL:** <https://forum.inductiveautomation.com/t/simple-question-add-preceding-zeros-in-expression-language/10778>\
**Category:** Ignition\
**Created:** [November 12, 2015, 2:33pm UTC](https://forum.inductiveautomation.com/t/simple-question-add-preceding-zeros-in-expression-language/10778 "2015-11-12T14:33:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikehill100](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@mikehill100](https://forum.inductiveautomation.com/u/mikehill100)\
**Post date:** [November 12, 2015, 2:33pm UTC](https://forum.inductiveautomation.com/t/simple-question-add-preceding-zeros-in-expression-language/10778/1 "2015-11-12T14:33:35Z")

</div>

Hi guys,

Easy question. I have tags that are like tag001, tag 002, tag 010, etc. I would like to indirectly reference these tags from a template repeater, but the count only gives me 1, 2, 3. not 001, 002, 003.

How would I script an expression to turn 1 into ‘001’? Is there an expression like python’s zfill()?

Thanks!

- Mike

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 12, 2015, 3:43pm UTC](https://forum.inductiveautomation.com/t/simple-question-add-preceding-zeros-in-expression-language/10778/2 "2015-11-12T15:43:03Z")

</div>

I think you can get the numberFormat function to do that for you. [support.inductiveautomation.com … format.htm](https://support.inductiveautomation.com/usermanuals/ignition/gen_strings_numberformat.htm)

---

<div class="post-metadata">

**Author:** ![mikehill100](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@mikehill100](https://forum.inductiveautomation.com/u/mikehill100)\
**Post date:** [November 12, 2015, 6:04pm UTC](https://forum.inductiveautomation.com/t/simple-question-add-preceding-zeros-in-expression-language/10778/3 "2015-11-12T18:04:59Z")

</div>

Shoot.

I feel dumb.

Thanks!
