Allow bulk change accounts to 'inactive'

bheck11's Avatar

bheck11

18 Feb, 2025 03:52 PM

Switched from Quicken a few months ago, now cleaning up the last old leftovers.

I have a lot (decades worth) of old accounts, all of which are closed. So I would like to change the status indicators (check boxes) for each of these old, unused accounts to Hide on Summary Page, Inactive, and (Do Not) Include in Net Worth.

I could go through the accounts list, editing each old account individually and clicking the appropriate checkboxes. But my mouse-clicking wrist is getting sore after just a few -- it sure would be nice to be able to batch edit accounts.

In the Toolbox extension, there's a function to change the Include in Net Worth setting, but it's not currently available.

So is there any way to batch edit accounts, specifically to adjust these three parameters? Thanks in advance for any ideas!

  1. Support Staff 1 Posted by Maddy on 18 Feb, 2025 04:13 PM

    Maddy's Avatar

    Hi,
    Thank you for contacting Moneydance support.

    Since the release of Moneydance 2024.3(5219) the Net Worth calculations have changed, as outlined in this article of the Knowledge Base.

    The main change is that it now includes inactive accounts (that had a balance). These were previously excluded..

    You can now permanently exclude accounts from the Net Worth calculations by navigating to **Tools->Accounts->Edit and UNTICK the include in Net Worth flag.


    Additionally, the steps for "Closing and Hiding Accounts" are outlined in this article of the Knowledge Base.
    Unfortunately a feature that allows you to bulk change the account status to 'inactive' is not currently available. However, I'd be happy to create a suggestion ticket for it, as I think it would be useful in cases like yours.

    I hope this information is helpful. Please let us know if you have further questions or need more assistance.

    --
    Maddy, Infinite Kind Support

  2. 2 Posted by Stuart Beesley ... on 18 Feb, 2025 05:35 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Here is a script you can run to select all inactive accounts and make them excluded from Net Worth. BACKUP FIRST

    fix=False    # >>> Change False to True to run the fix <<< 
    
    from com.infinitekind.moneydance.model import Account, AccountUtil, AcctFilter
    allAccts=AccountUtil.allMatchesForSearch(moneydance_data, AcctFilter.ALL_ACCOUNTS_FILTER)
    countFixed=0
    for a in allAccts:
     at=a.getAccountType()
     if at in [Account.AccountType.ROOT, Account.AccountType.INCOME, Account.AccountType.EXPENSE]: continue     # only select proper accounts
     if not a.getAccountOrParentIsInactive(): continue                                                                                                              # only select INACTIVE accounts
     if not a.isAccountNetWorthEligible(): continue                                                                                                                     # only select NW eligible accounts
     if not a.getIncludeInNetWorth(): continue                                                                                                                              # only select accounts still included in NW
     print at, "acct:", a, " Balance:", a.getCurrencyType().formatFancy(a.getBalance(), "."), " NW:", a.getIncludeInNetWorth(), " ** no change **" if not fix else " **FIXED**"
     if fix:
      a.setIncludeInNetWorth(False)
      a.syncItem()
      countFixed+=1
    print
    print "FIXED: %s accounts" %(countFixed)
    print
    

    Open Window/Show Developer tools. Paste the code into the Python Snippet area. Click Run SNIPPET.. Watch the console underneath it...

    You can run this as it is safely and IT WILL NOT CHANGE ANYTHING.. You can run and read the report....

    When you are ready, you can change line one from fix=False to fix=True. This will then update all inactive accounts that are NW eligible to be excluded...

    Let me know how this goes..

    (not support, just a fellow user)

  3. 3 Posted by Stuart Beesley ... on 18 Feb, 2025 05:44 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    I just reread your message and I see you also want to set hide on summary page, and inactive flags too...

    So, that becomes more tricky. The script needs to know which accounts to select. It's currently relying on the inactive flag being set..... So this may be no use to you unless you set all the closed accounts to inactive first... Anyway, this updated version will also set the hide on summary page as well as exclude from NW too..:

    fix=False    # >>> Change False to True to run the fix <<< 
    
    from com.infinitekind.moneydance.model import Account, AccountUtil, AcctFilter
    allAccts=AccountUtil.allMatchesForSearch(moneydance_data, AcctFilter.ALL_ACCOUNTS_FILTER)
    countFixed=0
    for a in allAccts:
     at=a.getAccountType()
     if at in [Account.AccountType.ROOT, Account.AccountType.INCOME, Account.AccountType.EXPENSE]: continue     # only select proper accounts
     if not a.getAccountOrParentIsInactive(): continue                                                                                                              # only select INACTIVE accounts
     if not a.isAccountNetWorthEligible(): continue                                                                                                                     # only select NW eligible accounts
     if not a.getIncludeInNetWorth(): continue                                                                                                                              # only select accounts still included in NW
     print at, "acct:", a, " Balance:", a.getCurrencyType().formatFancy(a.getBalance(), "."), " NW:", a.getIncludeInNetWorth(), " ** no change **" if not fix else " **FIXED**"
     if fix:
      a.setIncludeInNetWorth(False)
      a.setHideOnHomePage(True)
      a.setAccountIsInactive(True)
      a.syncItem()
      countFixed+=1
    print
    print "FIXED: %s accounts" %(countFixed)
    print
    
  4. 4 Posted by bheck11 on 18 Feb, 2025 10:24 PM

    bheck11's Avatar

    @Stuart Beesley - thank you! After a quick check, it looks like the script caught everything, and the results are as expected. (Years ago, I did enough coding to know that "as expected" may sound like faint praise, but is really a high compliment!)

    @Mandy - Yes, I think that a feature that would allow bulk Inactivate/Do Not Show in Net Worth/Remove from Summary Page would be useful for people converting from other programs, e.g., Quicken.Those who have used financial management software for some years may well have lots of old accounts: switched from bank X to bank Y; had a 401(k) at company A, got a new job and new accounts at company B; gave up on brokerage 1 and moved to brokerage 2; had a Visa credit card but opened an AmEx one -- those sorts of things. [Side note: after over 30 years of Quicken use, I was rather astonished to look back and see how many accounts of one kind and another were lurking around!]

    Ideally, the user might choose what accounts to inactivate, even though some of those accounts might show non-zero balances. That's because in Quicken (and other software?), you can get away with all kinds of things that cause issues in MD, and rather than straighten out all the issues, users may find it easier to simply make the accounts "go away" from current calculations and displays. (I did get all my old accounts to zero balances, but if I had it to do over again, just inactivating them and calling it a day would have been a lot easier.) Being able to simply mark a series of accounts all at once would be a major help.

    Of course, the value to MD of any of this is dependent on how many users switch from Quicken (or other software) and so would take advantage of such a feature.

  5. 5 Posted by Stuart Beesley ... on 19 Feb, 2025 11:02 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    I have now built this feature into the latest toolbox (preview build 1068). Available here:

    https://github.com/yogi1967/MoneydancePythonScripts/raw/master/sign...

    Accounts Menu:

    DIAG: Show all inactive accounts that are included in Net Worth calculations (MD2024.3 onwards)
    

    with update mode:

    FIX: Exclude all inactive accounts from Net Worth calculations (MD2024.3 onwards)
    

    You can safely run the DIAG - it's read-only. The fix will of course change data. But also note that undo mode is on so that you can use Edit/Undo to reverse this change.

    Let me know if you use this?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac