# Wrong behavior of the reference field

**URL:** <https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678>\
**Category:** Uncategorized\
**Created:** [October 22, 2022, 5:19am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678 "2022-10-22T05:19:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morhf164](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/morhf164/32/36354_2.png) [@Morhf164](https://forum.manager.io/u/Morhf164)\
**Post date:** [October 22, 2022, 5:19am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/1 "2022-10-22T05:19:18Z")

</div>

When I sort based on the reference field, it was not properly arranged in an upward count or countdown

 ![image](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/3X/a/1/a1dda3609bca96c74b18bbf47cf9912ef1da6e87.png)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/3X/6/f/6f8639c16fb37dfc4573b0aa0f40585c056d35e0.png)

---

<div class="post-metadata">

**Author:** ![Tut](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/tut/32/3286_2.png) [@Tut](https://forum.manager.io/u/Tut)\
**Post date:** [October 22, 2022, 5:21am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/2 "2022-10-22T05:21:20Z")

</div>

What version number are you on?

---

<div class="post-metadata">

**Author:** ![Morhf164](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/morhf164/32/36354_2.png) [@Morhf164](https://forum.manager.io/u/Morhf164)\
**Post date:** [October 22, 2022, 5:24am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/3 "2022-10-22T05:24:05Z")

</div>

![image](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/3X/e/c/ec71d798eaa2f71ddf3ae1eb5b031e740a5ec661.png)

---

<div class="post-metadata">

**Author:** ![Morhf164](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/morhf164/32/36354_2.png) [@Morhf164](https://forum.manager.io/u/Morhf164)\
**Post date:** [October 22, 2022, 5:26am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/4 "2022-10-22T05:26:04Z")

</div>

Note: I found that this matter happens in tabs without other tabs

For example, It works well in sales bills

 ![image](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/3X/4/2/429c56b7570a29b7ef7dcb601479f727b5f8589e.png)

---

<div class="post-metadata">

**Author:** ![Tut](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/tut/32/3286_2.png) [@Tut](https://forum.manager.io/u/Tut)\
**Post date:** [October 22, 2022, 6:44am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/5 "2022-10-22T06:44:40Z")

</div>

The default sort is by date. If you want the sort to be by reference number, you must select the reference number column heading.

---

<div class="post-metadata">

**Author:** ![Morhf164](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/morhf164/32/36354_2.png) [@Morhf164](https://forum.manager.io/u/Morhf164)\
**Post date:** [October 22, 2022, 10:09am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/6 "2022-10-22T10:09:57Z")

</div>

Thanks @Tut  
I know that

But the mistake that happens is that when I chose the sort according to the reference, the sort appears wrongly, as I attached to this with pictures

for example: The sort appears  
1  
10  
100  
101  
102  
etc

And the right thing should be  
1  
2  
3  
4  
etc

---

<div class="post-metadata">

**Author:** ![Patch](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@Patch](https://forum.manager.io/u/Patch)\
**Post date:** [October 22, 2022, 11:46am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/7 "2022-10-22T11:46:32Z")

</div>

That’s a text sort  
But you want a number sort.

The problem is some people want a alphanumeric sort.

The solution is for you to include leading zeros in your numbers

---

<div class="post-metadata">

**Author:** ![Morhf164](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/morhf164/32/36354_2.png) [@Morhf164](https://forum.manager.io/u/Morhf164)\
**Post date:** [October 25, 2022, 4:53am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/8 "2022-10-25T04:53:14Z")

</div>

Thank you for your answer  
I will consider this an acceptable solution

But the question, and what is done in the tabs without another  
For example, it works well for purchasing and selling invoices  
It does not work well in the receipts and payments

---

<div class="post-metadata">

**Author:** ![Morhf164](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/morhf164/32/36354_2.png) [@Morhf164](https://forum.manager.io/u/Morhf164)\
**Post date:** [October 25, 2022, 5:01am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/9 "2022-10-25T05:01:37Z")

</div>

Another problem:  
It is when you make an automatic reference, the manager will delete the zero prefix

![image](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/3X/0/9/0998db97104079329ec462626370839627b43f56.png)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/3X/6/2/623888800c24c53131ee54025cb196aa1faad415.png)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/3X/8/f/8f8e172efd15f18003b96e713619ae37082b28a6.png)

---

<div class="post-metadata">

**Author:** ![eko](https://avatars.discourse-cdn.com/v4/letter/e/a8b319/32.png) [@eko](https://forum.manager.io/u/eko)\
**Post date:** [October 25, 2022, 5:41am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/10 "2022-10-25T05:41:45Z")

</div>

Yes, the automatic reference number will just add 1 to the existing number and obviously does not recognize any prefixes including zeroes. The other reference numbers you show are entered manually not by using automatic.

---

<div class="post-metadata">

**Author:** ![eko](https://avatars.discourse-cdn.com/v4/letter/e/a8b319/32.png) [@eko](https://forum.manager.io/u/eko)\
**Post date:** [October 25, 2022, 5:44am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/11 "2022-10-25T05:44:50Z")

</div>

When automatic referencing then one would not expect it to be a text field but a numeric one and sorting of these numbers to be numeric not text. I think that @Lubos should change this to numeric.

---

<div class="post-metadata">

**Author:** ![ries](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/ries/32/8988_2.png) [@ries](https://forum.manager.io/u/ries)\
**Post date:** [October 25, 2022, 8:49am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/12 "2022-10-25T08:49:53Z")

</div>

> [@eko](#):
>
> @Lubos should change this to numeric.

Please not. Should be alpha-numeric, so letters can still be used.

---

<div class="post-metadata">

**Author:** ![eko](https://avatars.discourse-cdn.com/v4/letter/e/a8b319/32.png) [@eko](https://forum.manager.io/u/eko)\
**Post date:** [October 25, 2022, 9:00am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/13 "2022-10-25T09:00:49Z")

</div>

@ries, I agree that when not using auto reference that it could be a text-field, but obviously when enabling autoreferencing it is a numeric field and should allow for numeric sorting.

---

<div class="post-metadata">

**Author:** ![Morhf164](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/morhf164/32/36354_2.png) [@Morhf164](https://forum.manager.io/u/Morhf164)\
**Post date:** [October 25, 2022, 10:10am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/14 "2022-10-25T10:10:24Z")

</div>

I have indicated in a previous comment that the problem is made in tabs without other tabs

---

<div class="post-metadata">

**Author:** ![Tut](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/tut/32/3286_2.png) [@Tut](https://forum.manager.io/u/Tut)\
**Post date:** [October 27, 2022, 2:28pm UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/15 "2022-10-27T14:28:55Z")

</div>

What do you mean by “tabs without other tabs?”

---

<div class="post-metadata">

**Author:** ![Morhf164](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/morhf164/32/36354_2.png) [@Morhf164](https://forum.manager.io/u/Morhf164)\
**Post date:** [October 29, 2022, 4:42am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/16 "2022-10-29T04:42:45Z")

</div>

I indicated the meaning of my words in a previous post

But I apologize for the weakness of my communication language

> [@Wrong behavior of the reference field](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/8):
>
> Thank you for your answer I will consider this an acceptable solution But the question, and what is done in the tabs without another For example, it works well for purchasing and selling invoices It does not work well in the receipts and payments

---

<div class="post-metadata">

**Author:** ![eko](https://avatars.discourse-cdn.com/v4/letter/e/a8b319/32.png) [@eko](https://forum.manager.io/u/eko)\
**Post date:** [October 29, 2022, 6:44am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/17 "2022-10-29T06:44:07Z")

</div>

> [@Morhf164](#):
>
> I indicated the meaning of my words in a previous post

You still did not answer @Tut as the post you refer to is not clear. What are tabs without other tabs?

---

<div class="post-metadata">

**Author:** ![Morhf164](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/morhf164/32/36354_2.png) [@Morhf164](https://forum.manager.io/u/Morhf164)\
**Post date:** [October 29, 2022, 7:02am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/18 "2022-10-29T07:02:02Z")

</div>

Yes, sir. Thank you for your interest

This post talks about a problem, which is a mistake in the reference sorting by number according to the digital sequence

During my experience, I noticed that the error does not happen in the reference number in both the sale bills and purchase bills  
But the error occurs in payments and receipts

Thats all about it

---

<div class="post-metadata">

**Author:** ![eko](https://avatars.discourse-cdn.com/v4/letter/e/a8b319/32.png) [@eko](https://forum.manager.io/u/eko)\
**Post date:** [October 29, 2022, 7:27am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/19 "2022-10-29T07:27:37Z")

</div>

> [@Morhf164](#):
>
> This post talks about a problem, which is a mistake in the reference sorting by number according to the digital sequence

The answer to this was already provided by earlier post by @Patch [Wrong behavior of the reference field - #6 by Morhf164](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/6) that it is not an error but that the column is using text sorting in stead of numeric sorting and that the way to get better result is to manually add the reference number with leading zeroes. So you need to use 001 for 1 and 010 for 10 etc. which then will result in same sequence as a numerical sort.

Please can you still explain what you mean by tabs without other tabs?

---

<div class="post-metadata">

**Author:** ![Morhf164](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/morhf164/32/36354_2.png) [@Morhf164](https://forum.manager.io/u/Morhf164)\
**Post date:** [October 29, 2022, 9:16am UTC](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/20 "2022-10-29T09:16:06Z")

</div>

I have previously made it clear that when adding a zero prefix, the manager will take it in the following document

> [@Wrong behavior of the reference field](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678/9):
>
> Another problem: It is when you make an automatic reference, the manager will delete the zero prefix [image] [image] [image]

[Next page](https://forum.manager.io/t/wrong-behavior-of-the-reference-field/43678.md?page=2)
