# Is that possible to create auto-number fields?

**URL:** <https://community.fibery.io/t/is-that-possible-to-create-auto-number-fields/1610>\
**Category:** Ideas & Features\
**Tags:** automations\
**Created:** [May 11, 2021, 9:40am UTC](https://community.fibery.io/t/is-that-possible-to-create-auto-number-fields/1610 "2021-05-11T09:40:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eugene\_Vabishchevich](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/eugene_vabishchevich/32/4310_2.png) [@Eugene\_Vabishchevich](https://community.fibery.io/u/Eugene_Vabishchevich)\
**Post date:** [May 11, 2021, 9:40am UTC](https://community.fibery.io/t/is-that-possible-to-create-auto-number-fields/1610/1 "2021-05-11T09:40:29Z")

</div>

Hi guys,

do you know if it’s possible to create unique auto-number fields? For instance, I want to use a template US-{0000} where:

- US- will be fixed piece
- {0000} will start from 0001 and be incremented for every new record (random unique number also works)

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [May 11, 2021, 12:07pm UTC](https://community.fibery.io/t/is-that-possible-to-create-auto-number-fields/1610/2 "2021-05-11T12:07:20Z")

</div>

If you just need a unique id, can you use the entity public id (and concatenate with the prefix text as needed)?

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [May 11, 2021, 12:29pm UTC](https://community.fibery.io/t/is-that-possible-to-create-auto-number-fields/1610/3 "2021-05-11T12:29:54Z")

</div>

It’s a bit ugly, but if you need the leading zeroes, this formula should get you what you want:

`"US-{" + if(Length([Public Id])=1,"0000",if(Length([Public Id])=2,"0000",if(Length([Public Id])=3,"00",if(Length([Public Id])=4,"0","")))) + [Public Id] + "}"`

You can use this as the entity name, or as a standard formula field.

---

<div class="post-metadata">

**Author:** ![Eugene\_Vabishchevich](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/eugene_vabishchevich/32/4310_2.png) [@Eugene\_Vabishchevich](https://community.fibery.io/u/Eugene_Vabishchevich)\
**Post date:** [May 12, 2021, 11:40am UTC](https://community.fibery.io/t/is-that-possible-to-create-auto-number-fields/1610/4 "2021-05-12T11:40:00Z")

</div>

Thank you @Chr1sG In general your idea is good, it covers our needs. But the question is still open is it possible to generate automatic number. Seems like it’s a new feature request.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [May 12, 2021, 12:11pm UTC](https://community.fibery.io/t/is-that-possible-to-create-auto-number-fields/1610/5 "2021-05-12T12:11:52Z")

</div>

Given that the public ID starts at 1, automatically increments each time a new entity is created, and is never re-used, it seems to have the characteristics you are looking for, unless I’m missing something?  
I’m interested to hear what is the need that is not covered?  
(apart from an easier way of zero-padding 😉 )

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [August 10, 2021, 4:29pm UTC](https://community.fibery.io/t/is-that-possible-to-create-auto-number-fields/1610/6 "2021-08-10T16:29:45Z")

</div>

Slightly less ugly:

`"US-{" + Right( "0000" + [Public Id], 4) + "}"`

(not tested)

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [August 10, 2021, 4:34pm UTC](https://community.fibery.io/t/is-that-possible-to-create-auto-number-fields/1610/7 "2021-08-10T16:34:52Z")

</div>

haha, thanks.  
you can tell I’m not a natural born coder 🙄
