This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Bulk swap Payee and Comment?

Tags: None
(comma "," separated)
chill
Registered Member
Posts
16
Karma
0

Bulk swap Payee and Comment?

Mon Sep 05, 2016 10:57 pm
Hello,

I was wondering if it was possible to swap "payee" and "comment" in bulk?

I have accounts with a long history and I have realised that I have been importing data into the wrong fields. Is there a way to swap these data points over in bulk?

Thanks,
Chris

N.B. Can one connect the the embedded SQLite database and do this via a few SQL statements? If so, I'd be pretty comfortable with that as a solution.
vicnet
Registered Member
Posts
75
Karma
0

Re: Bulk swap Payee and Comment?

Tue Sep 06, 2016 7:04 am
Hello,
When you set SKGTRACE, a special page that allow direct sql function is available.

1-export SKGTRACE=1
2-execute skrooge
3-go to page "Debug"

Be carreful, you could do anything on this page and damage your database !

a+
Vicnet
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS

Re: Bulk swap Payee and Comment?

Tue Sep 06, 2016 8:34 am
You can do the swap by using the "Search and Process" page.
This is safer than sql.


Skrooge, a personal finances manager powered by KDE
Image - PayPal
chill
Registered Member
Posts
16
Karma
0

Re: Bulk swap Payee and Comment?

Wed Sep 07, 2016 11:57 pm
smankowski wrote:You can do the swap by using the "Search and Process" page.
This is safer than sql.


Thanks. So how would I do this in practice?

In Search I select "Payee" = "FOO" (my bad data), and that will bring up all the operations, a few thousand in total. This is good.

In Process I set Payee "=attribute" to Comment, and Comment "=attribute" to Payee. Run it, and see Payee is updated correctly, however Comment is not.

I'm guessing that this is a two step operation in the background?

1. Comment is written into Payee (now both fields are the same!)
2. Payee is written into Comment

Thinking more about this, as the payee is known fixed text I can probably do it as:

1. Comment is written into Payee (now both fields are the same!)
2. Payee is set to "FOO"

However this just sets both fields to "FOO", even if I flip the column order in the Process window... I'm so close!
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS
Hi,

This should work as you did ...
... but this doesn't :( .

This can be considered as a BUG ! I will try to fix it.

Nevertheless, to be patient, you can use this workaround:
1- Create a property named "for_exchange" and without value on an operation
2- Create the "search & process" rule like this:
Image
3- Run it.

I tested it and it works ;D


Skrooge, a personal finances manager powered by KDE
Image - PayPal
chill
Registered Member
Posts
16
Karma
0

Re: Bulk swap Payee and Comment?

Sun Sep 18, 2016 6:51 pm
smankowski wrote:Nevertheless, to be patient, you can use this workaround:
1- Create a property named "for_exchange" and without value on an operation
2- Create the "search & process" rule like this:
Image
3- Run it.

I tested it and it works ;D


Lovely I think this is exactly what I need. :)

Silly question, where/how do I get my custom property into the "process" dialog? (as created in step #1)
Edit: Needed to close and re-open the "Search and process" window for the new property to appear.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]