# Generate incremental ticket number

**URL:** <https://forum.bubble.io/t/generate-incremental-ticket-number/23971>\
**Category:** Need help\
**Created:** [February 2, 2018, 12:52pm UTC](https://forum.bubble.io/t/generate-incremental-ticket-number/23971 "2018-02-02T12:52:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Polar](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/polar/32/20194_2.png) [@Polar](https://forum.bubble.io/u/Polar)\
**Post date:** [February 2, 2018, 12:52pm UTC](https://forum.bubble.io/t/generate-incremental-ticket-number/23971/1 "2018-02-02T12:52:52Z")

</div>

Hi there,

I want to create an incremental ticket number field for every new thing that is created in my database.  
It has to be sequential, starting from the first event number that can be set.  
Something like 20170001 and the next thing it will create in my database EVENTS then will be 20170002, next 20170003 and so on. I made a field for it called EVENT\_NR.

I think I will have to do something like this:  
Search for EVENT last item’s EVENT\_NR (to get the last value of the EVENT\_NR field that was used before)

And then add 1 and make a new thing in EVENT with the newly generated EVENT\_NR.  
Anyone done this already and can give me a hint…

Thanks in advance,

Cornelius

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [February 2, 2018, 12:57pm UTC](https://forum.bubble.io/t/generate-incremental-ticket-number/23971/2 "2018-02-02T12:57:59Z")

</div>

![image](https://us1.discourse-cdn.com/bubble/original/3X/c/6/c614f9a54038c690bb71847c81392ebff4a35e92.png)

---

<div class="post-metadata">

**Author:** ![Polar](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/polar/32/20194_2.png) [@Polar](https://forum.bubble.io/u/Polar)\
**Post date:** [February 2, 2018, 1:02pm UTC](https://forum.bubble.io/t/generate-incremental-ticket-number/23971/3 "2018-02-02T13:02:37Z")

</div>

Thanks @NigelG,  
but where do I find the Create New Increment in my workflow builder?

 ![18](https://us1.discourse-cdn.com/bubble/original/3X/9/b/9ba3dac6c459491f69ca10bd8b84bec91228e3be.png)

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [February 2, 2018, 1:18pm UTC](https://forum.bubble.io/t/generate-incremental-ticket-number/23971/4 "2018-02-02T13:18:44Z")

</div>

It was just a new thing called “Increment”. In your case, create a New Event.

---

<div class="post-metadata">

**Author:** ![Polar](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/polar/32/20194_2.png) [@Polar](https://forum.bubble.io/u/Polar)\
**Post date:** [February 2, 2018, 3:34pm UTC](https://forum.bubble.io/t/generate-incremental-ticket-number/23971/5 "2018-02-02T15:34:50Z")

</div>

@NigelG,  
You mean create a custom event?  
I’ve never done that…

---

<div class="post-metadata">

**Author:** ![copilot](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/copilot/32/32859_2.png) [@copilot](https://forum.bubble.io/u/copilot)\
**Post date:** [February 2, 2018, 3:40pm UTC](https://forum.bubble.io/t/generate-incremental-ticket-number/23971/6 "2018-02-02T15:40:42Z")

</div>

Hey @Polar,

@NigelG’s example above shows the ‘Increment’ Thing which is from his own Bubble project. In your case, you would visit Workflows \> Data (Things) \> Create a new thing and set the Thing type to be ‘EVENT’. 👍

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [February 2, 2018, 4:35pm UTC](https://forum.bubble.io/t/generate-incremental-ticket-number/23971/7 "2018-02-02T16:35:31Z")

</div>

Sorry, yes I already had an Event table.

![image](https://us1.discourse-cdn.com/bubble/original/3X/7/7/773a496035177f2dbfa9d623cda364e9261732d6.png)

---

<div class="post-metadata">

**Author:** ![Polar](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/polar/32/20194_2.png) [@Polar](https://forum.bubble.io/u/Polar)\
**Post date:** [February 3, 2018, 4:28pm UTC](https://forum.bubble.io/t/generate-incremental-ticket-number/23971/8 "2018-02-03T16:28:12Z")

</div>

Thanks guys,@NigelG and @copilot

I really appreciate your efforts. Problem solved.

It works!!!

Cornelius.

![28](https://us1.discourse-cdn.com/bubble/original/3X/8/e/8eb71602b1f61728227255e43ee0fd524c743504.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [April 13, 2018, 12:52pm UTC](https://forum.bubble.io/t/generate-incremental-ticket-number/23971/9 "2018-04-13T12:52:58Z")

</div>

This topic was automatically closed after 70 days. New replies are no longer allowed.
