# \[SOLVED\]Number Generator From 1-99 \[Queue number\]

**URL:** <https://forum.sambapos.com/t/solved-number-generator-from-1-99-queue-number/11201>\
**Category:** V5 Question\
**Created:** [June 10, 2016, 2:35pm UTC](https://forum.sambapos.com/t/solved-number-generator-from-1-99-queue-number/11201 "2016-06-10T14:35:23Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Buglyo\_Balazs](https://forum.sambapos.com/user_avatar/forum.sambapos.com/buglyo_balazs/32/59648_2.png) [@Buglyo\_Balazs](https://forum.sambapos.com/u/Buglyo_Balazs)\
**Post date:** [June 10, 2016, 2:35pm UTC](https://forum.sambapos.com/t/solved-number-generator-from-1-99-queue-number/11201/1 "2016-06-10T14:35:23Z")

</div>

Hi all!

I would like to ask yours help, in the following.

I need a number generator , from 1-99 for every ticket.  
If it is possible 1is folliwing by 2 2 is 3 , 3is 4, etc 99 is 1.

But it should not be ticket number. We have a display which can show these numbers and we would like to add the order number automaticly.

Im very new with Samba but within 2 days i was able to install and config almost everything.

Regards

Balazs

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [June 10, 2016, 2:36pm UTC](https://forum.sambapos.com/t/solved-number-generator-from-1-99-queue-number/11201/2 "2016-06-10T14:36:39Z")

</div>

Ticket tag?  
Make a program setting and a flow to add one each time ticket created and set ticket tag with that value.

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [June 10, 2016, 2:40pm UTC](https://forum.sambapos.com/t/solved-number-generator-from-1-99-queue-number/11201/3 "2016-06-10T14:40:00Z")

</div>

Is it a queue number? This is a V2 tutorial but explains the idea fine.

[https://forum2.sambapos.org/index.php?topic=97.msg671#msg671](https://forum2.sambapos.org/index.php?topic=97.msg671#msg671)

---

<div class="post-metadata">

**Author:** ![Buglyo\_Balazs](https://forum.sambapos.com/user_avatar/forum.sambapos.com/buglyo_balazs/32/59648_2.png) [@Buglyo\_Balazs](https://forum.sambapos.com/u/Buglyo_Balazs)\
**Post date:** [June 10, 2016, 3:21pm UTC](https://forum.sambapos.com/t/solved-number-generator-from-1-99-queue-number/11201/4 "2016-06-10T15:21:32Z")

</div>

Yes this is a queue number.  
This tutorial is awsome. i did it , more or less it is okay, but we have only 2 digit, sometimes we have more than 100 order per a day. i try to figure out a rule for reset the number i didnt familier with sambapos right now.  
Im trying to learn as much as possible within 2 days.

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [June 10, 2016, 3:28pm UTC](https://forum.sambapos.com/t/solved-number-generator-from-1-99-queue-number/11201/5 "2016-06-10T15:28:32Z")

</div>

Show your rule you have made where number is increased.

You will just set to reset once 99

---

<div class="post-metadata">

**Author:** ![Buglyo\_Balazs](https://forum.sambapos.com/user_avatar/forum.sambapos.com/buglyo_balazs/32/59648_2.png) [@Buglyo\_Balazs](https://forum.sambapos.com/u/Buglyo_Balazs)\
**Post date:** [June 10, 2016, 3:43pm UTC](https://forum.sambapos.com/t/solved-number-generator-from-1-99-queue-number/11201/6 "2016-06-10T15:43:12Z")

</div>

![](https://forum.sambapos.com/uploads/default/original/3X/c/4/c4351511a9463b7f9261d54232b18078036232c9.PNG)

this is where i give the number to the ticket.  
i followed the v2 tutorial.

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [June 10, 2016, 3:44pm UTC](https://forum.sambapos.com/t/solved-number-generator-from-1-99-queue-number/11201/7 "2016-06-10T15:44:06Z")

</div>

OK, the increase counter action is a program setting update right?

---

<div class="post-metadata">

**Author:** ![Buglyo\_Balazs](https://forum.sambapos.com/user_avatar/forum.sambapos.com/buglyo_balazs/32/59648_2.png) [@Buglyo\_Balazs](https://forum.sambapos.com/u/Buglyo_Balazs)\
**Post date:** [June 10, 2016, 3:45pm UTC](https://forum.sambapos.com/t/solved-number-generator-from-1-99-queue-number/11201/8 "2016-06-10T15:45:03Z")

</div>

Yes! As i know 🙂

Action for Increasing the counter  
Create a new action, Name it as “Increase daily counter” and the Action Type will be “Update Program Setting”  
Setting Name will be ORDERNUMBER  
Setting Value is 1  
Update Type is Increase  
IsLocal = False

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [June 10, 2016, 3:50pm UTC](https://forum.sambapos.com/t/solved-number-generator-from-1-99-queue-number/11201/9 "2016-06-10T15:50:27Z")

</div>

You want a third action in that rule to change to 0.  
As the constraints will be worked out at begining you would want to reset on 98 rather than 99.

Fields would be;  
Setting Name will be ORDERNUMBER  
Setting Value is 0  
Update Type is Update  
IsLocal = False

![](https://forum.sambapos.com/uploads/default/original/3X/0/5/05df29ac4a02865e917a83f0709315c38bc1c045.png)

Add to that rule.  
On the action constraint put;

‘{SETTING:ORDERNUMBER}’ == ‘98’

So on ticket created where value is 98 to rule will;

- Increase to 99
- Add to ticket
- Reset to 0

---

<div class="post-metadata">

**Author:** ![Buglyo\_Balazs](https://forum.sambapos.com/user_avatar/forum.sambapos.com/buglyo_balazs/32/59648_2.png) [@Buglyo\_Balazs](https://forum.sambapos.com/u/Buglyo_Balazs)\
**Post date:** [June 10, 2016, 4:01pm UTC](https://forum.sambapos.com/t/solved-number-generator-from-1-99-queue-number/11201/10 "2016-06-10T16:01:59Z")

</div>

Thank you for your help!

This is awsome!  
I have some more question about the program , and the settle screen , should i make a new topic for them?

Regards

Balazs

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [June 10, 2016, 4:02pm UTC](https://forum.sambapos.com/t/solved-number-generator-from-1-99-queue-number/11201/11 "2016-06-10T16:02:39Z")

</div>

Yes, make new topic, is better for all users when searching a question.

---

<div class="post-metadata">

**Author:** ![29DegreesN](https://forum.sambapos.com/user_avatar/forum.sambapos.com/29degreesn/32/16974_2.png) [@29DegreesN](https://forum.sambapos.com/u/29DegreesN)\
**Post date:** [August 31, 2017, 5:20am UTC](https://forum.sambapos.com/t/solved-number-generator-from-1-99-queue-number/11201/12 "2017-08-31T05:20:50Z")

</div>

Please do add default mapping for both the rules in the tutorial.  
regards  
anil

---

<div class="post-metadata">

**Author:** ![AK\_Khanzada](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/a/cab0a1/32.png) [@AK\_Khanzada](https://forum.sambapos.com/u/AK_Khanzada)\
**Post date:** [March 9, 2018, 11:33pm UTC](https://forum.sambapos.com/t/solved-number-generator-from-1-99-queue-number/11201/13 "2018-03-09T23:33:10Z")

</div>

Hello can you send me this method with screen shots
