Autofill for entering assets names: broken ?

Derek Atkins warlord at MIT.EDU
Mon Nov 12 10:06:47 EST 2012

David Carlson <carlson.dl at> writes:

> On 11/7/2012 6:31 PM, Eric Dedieu wrote:
>> Hi,
>> I'm using gnucash 2.4.11, with a 3-level account hierarchy. The first
>> level uses for brevity a single letter, A: for Assets, E: for
>> Expenses. I name sub-accounts with different first letters, so using
>> only the keyboard I can enter an account name, for example typing
>> "E:L:M" is enough for "E:Leisure:Mountain", or "A:F:C" for
>> "A:FirstBank:Children". Autofilling makes it easy.
>> This was working very well, until I started to keep tracks for 2
>> persons, using A: and E: for the 1st, and AA: and EE: for the other.
>> After a while, autofilling began to drift from the expected behaviour.
>> Typically, things lke:
>> A:Bar
>> AA:Foo
>> AA:Foo:Bar
>> -> "A:" autofills to "AA:Foo" (caret after :) instead of A:Bar (caret after :)
>> -> "A:F" autofills as far as "A:Foo:Bar" (caret after second :)
>> instead of "A:Foo" (caret after :)
>> When I use the mouse to open the dropdown asset list, I see that the
>> order of lines is inconsistent, as if A: and AA: were compared as
>> equal for sorting. I can have a dropdown list like:
>> A
>> A:Bar
>> AA
>> A:Coco
>> A:Coco:Nut
>> AA:Bar
>> AA:Other
>> A:Foo
>> A:Other
>> AA:What
>> In this list, extracting a same prefix (A: or AA:) the sort order is
>> ok, but prefixes seem interleaved randomly.
>> I can't guess why autofilling would also go "too far", i.e., typing a
>> ":" would fill two levels (second example above).
>> This broke little by little. At first there were just some failures,
>> now the keyboard has become unusable and I have to use the mouse, drop
>> down and click. It  may be renaming/moving/adding/deleting accounts
>> that broke it step by step, I did refactor the account hierarchy
>> extensively. I didn't use much the dropdown list when the keyboard was
>> enough, so I didn't notice when it got messed up.
>> I wonder if the dropdown order is stored somewhere and not simply
>> dynamically computed? then how could I erase it to be rebuilt cleanly?
>> If nobody was hurt by that problem yet, it may be specific to repeated
>> letters as account names? Using A1 and A2 would not be so easy to type
>> in, but may be worth trying...
>> Thanks for any hint,
>> Eric
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
> I found this question in my spam folder.  It appears that no one has
> answered it.  Did it go to everyones' spam folders?  I think that it is
> an interesting question that deserves a good answer.   Is the use of
> single character and dual character account names valid?  I think that
> the colon is not allowed in an account name.  Is that true?  What if a
> different separator character is chosen in the preferences?
>  I want to find out if there is a bug in the account selection method.

It's not a question of the number of characters, but the fact that they
start the same.  In a *normal* account hierarchy you have something

  +--Opening Balances

In order to get to the checking account you can type:  a : b : c
(capitals don't matter here).  This works because 'a' resolves to only
one answer, assets.  This is *not* true for the groceries account.  You
cannot just type e : g, because 'e' isn't unique.  You need to type e x
: g to get to the groceries account.

So, back to the original question, unfortunately a and aa aren't unique
by 'a', and in fact even though 'a' is fully qualified, it is possible
that typing a : would result in aa based on previous usage.

I would recommend you instead use more fully qualified account names,
and make sure one is not a fully contained prefix of another.  I.e.,
don't use "Assets" and "Assets 2".  Instead, use "Assets 1" and "Assets
2".  In this case I *believe* you could do something like a -> 1 : ...
(where -> is the right-arrow key).  I *think* this works, but haven't

Good Luck,

> David C

> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.


       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL:    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

More information about the gnucash-user mailing list