Search options for Number field treat it as a string, not a number

Michael Hendry hendry.michael at gmail.com
Fri May 10 13:16:24 EDT 2013


On 10 May 2013, at 17:19, Derek Atkins <warlord at MIT.EDU> wrote:

> Hi,
> 
> Michael Hendry <hendry.michael at gmail.com> writes:
> 
> [snip]
>> I thought I should be able to use Edit=>Find and select Number
>>> =117894 (for example) to find out if the top receipt was the most
>> recently numbered transaction, but the options are "contains",
>> "matches regex" and "does not match regex".
>> 
>> I appreciate that the Number column is allowed to contain alphabetic
>> as well as numeric characters (which annuls the value of the "+" key
>> to get the next number in the sequence).
> 
> The Number column *IS* a text column.  It's only treated as a number for
> sorting purposes and for the shortcut '+' to key choose the next number
> for a register.  However there is absolutely no requirement that you
> input solely numerical input.
> 
> This is also why the search works the way it does; the data field is a
> string, so it can only be searched like a string.
> 
>> I've worked around the problem by using "Contains" 11789 (as in the
>> above example), but this has obvious flaws.
>> 
>> Can anyone suggest a more reliable way of determining the highest
>> number used in the Number field of any register?
> 
> Open the GL and use the + key from there? 

That should work, but here's what happens when I try it - I've opened the GL, sorted it into Number order, and pressed the + key in a new transaction:



The third transaction illustrates what happens when I lose the place, and enter an already-used number after switching to a different register.

Despite the fact that there are already two transactions numbered 117924, the + key delivers yet another.

(I've noticed that this also happens if I finish the reconciliation of  (e.g.) a credit card account, use the next available transaction number for the payment from the bank to the credit card account, and then go back to the credit card account to make another entry - the + key duplicates the number instead of incrementing it.

That said, I realise I can now use the GL to check that I haven't duplicated transaction numbers, and to identify the next free number - thanks Derek!

Michael


> 
>> Michael
> 
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
> 
> -derek
> 
> -- 
>       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
>       Member, MIT Student Information Processing Board  (SIPB)
>       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
>       warlord at MIT.EDU                        PGP key available



More information about the gnucash-user mailing list