Jython - delete txn

davidcullen's Avatar

davidcullen

22 Dec, 2019 02:59 AM

Please forgive this newbie question. I've lost old jython/python files - I was able to do this in the past but now have forgotten how. I cannot find any guidance in on-line docs (maybe I'm looking in wrong place).
Simply, I have some txns:

txns = [t for t in txnset if x in t.getDescription()]
I simply want to loop in jython and delete (remove) each transaction but cannot remember the appropriate command.
Can anyone please help?
  1. Support Staff 1 Posted by Sean Reilly on 22 Dec, 2019 08:58 AM

    Sean Reilly's Avatar

    Hi David,
    Great question! You'll want to call .deleteItem() which is probably tricky to find in the docs because it's in the superclass of the transaction object.

    Cheers,
    Sean

  2. 2 Posted by davidcullen on 23 Dec, 2019 09:12 AM

    davidcullen's Avatar

    I knew there was a simple way! Thanks for the prompt response - I had tried .txnDelete() and .deleteTxn(), both of which failed!

  3. davidcullen closed this discussion on 23 Dec, 2019 09:12 AM.

Comments are currently closed for this discussion. You can start a new one.

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