Registered Member
|
I recently started using KMyMoney. For some of my bank accounts, the CSV transaction logs I imported did not have separate fields for the payee and the payment description; there was one field that contained both types of information, with no clear separation between them. (Certainly nothing that a regular expression would have been able to reliably split.) I chose to import this field as "Payee/Description", not realizing that this would result in KMyMoney creating a separate payee for almost every transaction. I know that I can now merge these payees in the "Payees" view, but I think this will end up replacing the payment descriptions for the individual transactions. Is there any way that I can automatically copy the value of the Payee field to the Memo field for all transactions of a given account? From looking at the XML file, I could probably hack together a short program that does this, though if there is a way of doing this from within KMyMoney I would prefer to take that safer route.
|
KDE Developer
|
Your script is the best bet you could get at this point. This functionality is not available in KMyMoney. Use the merge feature to get rid of the multiple payees. I think you can do that with a multiple/all in one shot.
ipwizard, proud to be a member of the KMyMoney forum since its beginning.
openSuSE Leap 15.4 64bit, KF5 |
Registered Member
|
I've started on the script but it seems this may be more complicated than I thought. In my kmy file, I have some transactions with KEYVALUEPAIR elements that contain escaped XML:
If I'm copying the payee name into the memo field, do I also need to make sure I do it inside these embedded XML snippets? |
KDE Developer
|
The embedded XML structures are 'matched transactions'. Once you accept them, they will be gone. So you should do that as a first step before you massage the XML.
ipwizard, proud to be a member of the KMyMoney forum since its beginning.
openSuSE Leap 15.4 64bit, KF5 |
Registered Member
|
Thanks! Here's the script in case anyone wants it:
Last edited by psychonaut on Fri Jan 17, 2020 9:20 am, edited 1 time in total.
|
KDE Developer
|
Please keep in mind that the order of attributes in an XML element is not guaranteed. An expression like
may therefore fail in the future.
ipwizard, proud to be a member of the KMyMoney forum since its beginning.
openSuSE Leap 15.4 64bit, KF5 |
Registered Member
|
Thanks; I've updated the code in my post to address this issue. |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft