[GNC] OFX import when bank doesn't use unique ACCTID

Ryan Boder ryan.boder at gmail.com
Tue Oct 23 07:14:40 EDT 2018


On Mon, Oct 22, 2018 at 10:31 PM David Reiser <dbreiser at icloud.com> wrote:

> > On Oct 22, 2018, at 9:27 PM, Ryan Boder <ryan.boder at gmail.com> wrote:
> >
> > I'm new to gnucash and have run into a frustrating problem importing my
> > bank accounts. My bank is putting a non-unique number in the ACCTID field
> > of the OFX files. They only put the last 4 digits of what they call the
> > "member number product ID" in as the ACCTID. I have multiple accounts
> with
> > this bank and all my accounts have the same last 4 digits in that ID.
>
> Are they sending you more than one account per file. That is permissible
> in the OFX standard, but there would have to be something that identified
> the subaccount uniquely. Is there some other line in the file that provides
> ID of the subaccount? If so, one option is to process each file via script
> (that you’d have to write) before importing. If your bank doesn’t give you
> any way to tell which account one OFX file is from vs another OFX file,
> that’s a user hostile bank.
>

The OFX files only have 1 account each. I download a separate OFX file per
account. The problem is each file has the same information in
the BANKACCTFROM section, even for my different accounts (1 for each family
member):

                                <BANKACCTFROM>
                                        <BANKID>USA
                                        <ACCTID>0090
                                        <ACCTTYPE>CHECKING
                                </BANKACCTFROM>

0090 is the last 4 digits of the "member number product ID" for all my
accounts. The full member number product ID is unique but the bank only
puts the last 4 digits in the OFX file. I suppose that means the bank is
doing it wrong? I can reach out and ask them to fix it but I wouldn't hold
my breath on that happening.

I'll use the approach you recommended and write a script to preprocess the
OFX files and insert the full ID.



> >
> > 3) My bank supports CSV export as well as OFX/QFX. I could avoid OFX all
> > together and try to make something work with CSV. This doesn't seem ideal
> > as it's not a standard file format and it looks like I would have to do
> > some manipulation of some of the fields to make it work in Gnucash.
>
> The Gnucash version 3.x CSV importer is much better than prior versions.
> If your CSV has any structure at all, it should be possible to set up the
> import settings to get the data, and save those settings so you never have
> to edit them again — just pick the settings definition in a dropdown menu
> during the import. The CSV importer has the added advantage that you get a
> look at the file you’re importing and can tweak the settings and see the
> filtering results before actually importing the file.
>

You're right, CSV import does work out of the box. It just took tinkering
and figuring out the right settings. So I have 2 usable solutions.

Thanks Dave!

- Ryan


More information about the gnucash-user mailing list