How to assign transaction to accounts automatically.

jeffrey black beastmaster126 at hotmail.com
Wed Feb 21 02:38:11 EST 2018


On 2/20/2018 10:03 AM, Edward Bridges wrote:
> If you downloaded the transactions in QIF format, you may find this tool interesting:
>
> https://github.com/Kraymer/qifqif
>
> I have used for about a year now and it's really effective at categorizing transactions to the correct account before importing.
>
>
> On Tue, Feb 20, 2018, at 10:09 AM, John Ralls wrote:
>>
>>> On Feb 20, 2018, at 4:39 AM, Hans Deragon <hans at deragon.biz> wrote:
>>>
>>> Greetings,
>>>
>>> New user here.  I downloaded 500 transactions from my credit card bank
>>> site, all assigned to 'Imbalanced-CAD'.  Now, how can I set rules to
>>> automatically assign transactions to a specific account?  For instance,
>>> any transaction with "^ESSO.*" or "^SHELL.*" must be reassigned to
>>> Car:Gasoline.  I fail to find that information on the web, except that
>>> when importing, GnuCash trains itself and does that automatically at the
>>> next import.
>>>
>>> But what about my 500 transactions that are already imported?  What
>>> about if one wants to reassign transactions to another account, after a
>>> month of careful thinking?  Does a user have to go through all
>>> transactions manually?
>>>
>>> As a workaround, is it possible to convert the GnuCash file into Unicode
>>> and use scripting languages to manipulate the transactions, then convert
>>> it back to its binary format?
>>>
>>> Using GnuCash 2.6.12 on Ubuntu 16.04 LTS.
>> No, GnuCash does not train itself: You have to train it. You do that by
>> assigning the transactions to accounts during import. That’s what that
>> dialog with all of the yellow was about. Your best course of action is
>> to go to the backup from before the import and start over.
>>
>> Otherwise, yes, the only way to change transactions is one-at-a-time.
>> You can speed it up a bit using the Edit>Find to select a group of
>> transactions that you want to change to a particular. You’ll get a
>> editable register and you can just go down the list changing each
>> transfer account.
>>
>> Regards,
>> John Ralls
>>
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at 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.
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at 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.

Hans:

I assume you are using the OFX/QFX importer.  As Derek recommends you have a choice of either reverting your data back to before the import and then correctly assign the transactions (preferably with a small number of transactions at a time) or manually reassign all 500 and then proceed to retrain the importer for all future transactions. If you revert back to a previous backup, you will also have to re-enter all transactions entered after that import.

Derek could probably write a Python script in his sleep to do the corrections, if he ever sleeps.  Personally I don't think that he ever does sleep (:-))!! His up-time is longer than the servers.  So that is not an option.

Also personally, I have grown tired of the downloads I get from my financial institutions, all "YELLING" at me with payee names that are not human friendly when I forget to enter a transaction first.  I have been bludgeoning a Perl script to make the downloaded OFX/QFX files more friendly.  IE. "^SHELL.*" will be replaced with "Shell Gas".  If you have just a few names to change, you can easily use a search & replace with a good text editor or awk/sed on all future downloaded OFX/QFX files, and QIF for that matter.  It will bypass what the Bayesian logic has already learned. Doesn't solve your current 500 transactions problem I know but; will make your books more readable if you neglect to enter a transaction in the future.

Just my 2 U.S. cents worth.

--JEffrey Black M.B.A.



More information about the gnucash-user mailing list