Force an account to sort to the bottom of the list

Is there a character I can put at the beginning of an Account or Group name in Chart of accounts to force that account to sort to the bottom of the list in the Summary and on Reports?

The goal is to have my “Other” accounts (Other expenses, Other income, Other business property) appear at the bottom of their respective groups.

I don’t want to use account Codes because (1) I would have to assign a code to every account in order to have a single account sort to the bottom, because coded accounts always appear before un-coded accounts, and (2) I find the codes distracting when they appear in the Summary pre-pended to the account name.

If I put a tilde, for example, at the beginning of an account name (like ~ Sales), it sorts to the top of its group. I can put a few z’s at the beginning of the name (like zzz Other expenses) to cause the group to sort to the bottom, but that’s ugly. I’ve tried many ASCII characters that come after Z in the ASCII table, but they all seem to sort before A. Has anyone found one that works?

@Lubos: Because Other... is a real thing, perhaps a good enhancement would be to have a check box in Chart of Accounts items that forces the account or group to sort to the bottom of its list. (All accounts or groups with the box checked would go to the bottom together, sorted alphabetically within.) Alternatively, allow for a special Code (perhaps * or z) that would force bottom-sort but that would not be displayed anywhere – or better yet, allow alphabetical account codes that affect sorting but that are never displayed (so account code A sorts after code 999, and B sorts after that, but neither A nor B are ever displayed anywhere). Or alternatively again, let items with codes sort after un-coded items instead of before them, so the Other category can be given a code instead of having to assign codes to every single non-Other category to get Other to go to the bottom. Or, keeping it very simple, just automatically sort “Other” after Z – but this would be a very English-centric approach.

Use Code field to reorder groups, totals or accounts.

I have 15 expense accounts, but only one that I want to go to the bottom. Is there a better way to do this other than assigning Codes to all 15 accounts? If I give a code just to the one that I want to go to the bottom, it goes to the top. Can we have a special code that always sorts after un-coded accounts (like perhaps -1 or 0 or *)?

Or can you arbitrarily establish a Code cutoff like 99999, below which all Codes sort before un-coded items as they do now but above which all Codes sort after un-coded items? (So Codes 1, 100, 2000, and 10101 come first, followed by un-coded accounts in alphabetical order, followed by Codes 100000, 100001, and 250123.) For those who use Codes on every account, the change would have no effect. For those who only use Codes less than the cutoff, the change would have no effect. If you set the cutoff high enough, there should be little impact to anyone except those who specifically want a particular account to sort to the bottom.

That’s quite a good idea.

OK, so starting with the latest version (16.2.6), if you don’t want to set codes on all accounts within a group, set negative code number to move the account to the beginning and positive number to move the account to the end.

The logic is that accounts will be always sorted by account code, then by account name. If account code is missing, then it will be assumed the account code is zero. That’s why negative account code numbers will appear before zero account codes.

Yeah, occasionally I have one of those. :wink:

Your plan is excellent for me, but be careful about how this might affect those who already use codes and expect coded items to come first. (I actually fit into this category too. I have a Sales income group, Code 1, that I intentionally want to come before all the other, non-coded income accounts. Under the change you propose, I would have to change that group to Code -1 to keep it at the beginning. I would gladly trade off that change to be able to get my Other... accounts to go to the bottom, but I suspect there will be many upset users.)

It doesn’t make mathematical sense for negative to come after positive, but in this case it might make sense to do that and have the negative codes go to the bottom – specifically because I doubt anyone currently uses negative account codes, and because the current state is that positive account codes come before non-coded accounts. Perhaps this is a reason to permit alphabetical account codes, for those accounts that should go to the bottom: Then the sort will still make sense, with numbers first, then non-coded accounts (assume code [space]), then lettered accounts.

Also, especially now with negative numbers (or letters), I’d really like to see account codes be given a special font treatment in the Summary, similar to how they appear in the Chart of Accounts screen: light grey font, after the account name. They’re currently very distracting in the Summary as full-size black numbers of varying length pre-pended to the account name. Better yet, provide a check-box option to suppress account Codes on the Summary (and, while you’re at it, an option to display them on Reports).

This doesn’t bother me. It’s easy to fix for users. I will rather break something as soon as possible than carry baggage forever.

This has been already implemented on reports such as P&L and Balance Sheet. I will add the option to hide account codes in Summary tab.

1 Like

Lovely, thank you!

See here for another suggested option to add to the Summary tab, discussed elsewhere.

And, @lubos, the account codes still appear in undesirable places without the option to suppress them, like in most drop-down lists as well as the GL Transactions report:

For an unorthodox approach which doesn’t require any special coding or programme changes.
Change Other for Sundry as that kicks them further down the alphabet and if that hasn’t achieved the result then reverse the S and you get Zundry - that never fails to end up at the bottom.

If you ever need to produce your financial reports for a bank etc, just do a quick spelling correction.

1 Like