OFX/QFX Import

David Reiser dbreiser at earthlink.net
Sat Mar 19 00:08:09 EDT 2011


On Mar 18, 2011, at 10:12 PM, Robin Chattopadhyay wrote:

> Hi-
> 
> GC 2.4.0/Windows 7
> 
> I'm having a problem with importing QFX files. My wife and I both work for
> the same employer and consequently the same 401k provider and investment
> options
> 
> I downloaded from their website QFX files for each of us. When I imported MY
> file and worked through the Generic Import Transaction Manager, I associated
> all of the commodities and accounts and imported all the transactions
> without a problem.
> 
> However, when I tried to import my wife's transactions, the import
> transaction manager tries to match all of the transactions to MY accounts.
> I'm not presented the opportunity to associate *her* file with *her*
> accounts/commodities. Is there something in the headers of the QFX file that
> makes gnucash think these files are actually both for the same accounts?
> 
> I've attached the trace file.
> 
> Thanks,
> Robin
> 

First, I don't see anything in the trace file associated with your problem. Most of the messages are associated with ofx tags that libofx has never imported. The 'invalid amount' messages are new to me, but I'm fairly sure that those messages are not relevant either.

Near the top of the ofx file, there should be a tag set something like:
<ACCTID>1234567890</ACCTID>
In older ofx versions, the </..> tag might be missing. Since your files are importing, I don't think you have a problem here.

As long as the ACCTID of your two files is different, gnucash is associating one split of each transaction being imported with the account linked to the ACCTID. If you mistakenly tell gnucash that the second ACCTID should be associated with the same investment account as the time you imported the first account's data, then things can get confusing. But gnucash can only associate one account with one ofx ACCTID at a time.

I think, however, you're running into the other end of the problem. Once you've imported a set of transactions, the matcher has some idea of what transactions go to which account for the second split of each incoming ofx transaction. Since you now are importing a second list which largely matches the one you've already entered with the first account, the import matcher says "aha!, I know where those go." 

You can double click on the right end of any transaction in the generic import transaction matcher dialog to reassigned the target account. That gets old really quickly, though...

My wife and I both get TIAA-CREF contributions from our employers. While the transaction identifiers aren't identical, the differences don't start until something like 40 characters into the tag. I haven't checked the code, but I have the feeling that the matcher doesn't look that far into a tag to find differences. I do have to reassign some transactions after importing them from my account (my wife had tiaacref benefits before I did). And I think that's what you're complaining about.

Short of a modification to the import matcher, about the only thing you could do would be to write a text processing script and run it on one of your ofx files before importing the file to make sure the tags are unique enough to get the matcher to put transactions in the right accounts.

Dave
--
David Reiser
dbreiser at earthlink.net






More information about the gnucash-user mailing list