Lisa,

I will add to David’s advice that you can use the NUM field other than a simple 
1,2,3,4...

You might, for example, need or want to keep an actual transaction number with 
the transaction.

For that case, you can put the real transaction number in the Action or Memo 
field of the split.

Otherwise, you can use the NUM field to sort transactions with a time value. 
(with 4 simple caveats)

1. Using the NUM field this way doesn’t magically turn it into a time field, 
you’re just going to put time info there. It will still think and treat the 
info as the transaction NUMber.

2. The sorting algorithm stops when it encounters a non-numeric. So you can’t 
use the : separator for hours:minutes.

3. This also means you can’t use an AM/PM (a/p) designation, you must use 24 
hour time.

4. Since these are just numbers, you might not in the future be able to 
distinguish them from actual transaction numbers so you’ll need some way to 
indicate this is a time entry for sorting purposes.

I’ve solved this conundrum by entering the time (or best approximation) of the 
actual transaction occurrence in 24 hour notation, without a separator, and 
with the suffix “t” for “time”.

So a transaction I’m entering off a receipt in my Cash account (where this is 
usually the biggest trouble as a Cash account can’t ever be negative which can 
and likely will happen at some point if you leave GnuCash to its own devices) 
that has a real-world time stamp of 3:12pm will be entered with the NUM field 
containing ‘1512t'. (sans the quotes of course)

This will sort the transaction properly based on its actual order of occurrence 
and at a glance I know this is not a real transaction number. If this 
transaction also has one of those, I put it in the Action field. (but I have 
NOT set the ‘Use Action Field for NUM’ preference as I do not want to do so — 
it would mess up the sorting. I just want a place to put my info.)

Hope this helps.

-----


David,

Thanks for that detailed run-down of the sort order. (I hadn’t bothered to step 
through the code yet on that one)

Regards,
Adrien

> On Mar 2, 2019, at 5:38 PM, David Cousens <davidcous...@bigpond.com> wrote:
> 
> Lisa
> 
> In the register display for an account you will see a field Num. You can
> specify a number for each transaction which  will determine the order in
> which the transactions are displayed.This however affects all registers in
> which the transaction appears as per the second reference below. It is
> really meant for entering cheque numbers.
> 
> See
> https://www.gnucash.org/docs/v3/C/gnucash-guide/txns-register-oview.html,
> https://www.gnucash.org/docs/v3/C/gnucash-help/book-options.html
> 
> The following posts contain useful info as well
> http://gnucash.1415818.n4.nabble.com/Ordering-Transactions-on-same-date-td4683272.html
> 
> and the FAQ
> http://wiki.gnucash.org/wiki/FAQ#Q:_How_do_I_order_transactions_in_a_register_so_deposits_are_before_withdrawls.3F
> reproduced below:
> 
> Q: How do I order transactions in a register so deposits are before
> withdrawals?
> A: Enter deposits (debits) first, then withdrawals (credits).
> 
> When ordering transactions in a register window (the display of transactions
> for a particular account), you're really ordering the splits for that
> account. The fields examined, in order, are:
> 
> The Posted Date. This is the one that's visible and editable in the register
> window.
> The Transaction's Num field 'unless' you have selected "Use Split Action
> Field for Number" in the Accounts tab of Book Options (accessed by
> File>Properties in the menus) in which case it will sort on the Action field
> for the split 'in the account displayed on the register window'. Note that
> there is also a preference on the General tab to make that selection
> automatically on new files.
> The Transaction Entry Date/time: This is the date and time that the
> transaction was first created. It is not editable in the User Interface.
> The Transaction Description field.
> The Split's memo field.
> The Reconcile field.
> The amount of the split.
> The value of the split.
> The Reconcile Date.
> The GUID identifying the split.
> Thus the Num or Action field is consulted only if the Posted Date is the
> same, the Entry Date/Time only if the Num or Action fields are the same, and
> so on.
> 
> This question is sometimes asked as "how do I reorder transactions so that
> they'll match my bank statement?". Don't. You're keeping your own books, not
> the bank's. Use the Reconcile window to reconcile the two.
> 
> If you insist on reordering, the only way to do it in the UI is to edit the
> Num fields on the transactions in question or the Action field for the split
> if you've selected that option; this might cause you problems if you're
> using that field for something else, like check numbers.
> 
> David Cousens

_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to