Skipping reminder transaction with python
I have a python script that I use to update my recurring reminder transactions, and when it is done updating I would like it to programmatically perform the equivalent of the "Skip Transaction" button that is shown when clicking on "Record Next Occurrence", therefore updating the next occurrence dates automatically.
I have looked through the Reminder class documentation but I don't see any method to skip or to set a new transaction date. Can anyone recommend a solution to this? Thanks.
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
Support Staff 1 Posted by Sean Reilly on 31 Jan, 2020 04:54 PM
Hi Scott,
No problem! Skipping a reminder just means setting the "acknowledged" date to the date of the occurrence that you'd like to skip. Since reminders can only be recorded in chronological order this tells the reminder system to ignore any scheduled occurrences on or before that date. So you'd want to call the following to ignore all events through today:
reminder.setAcknowledgedInt(20200131);
reminder.syncItem();
Thanks,
Sean
2 Posted by scott7k on 31 Jan, 2020 11:05 PM
Sean, that's great, thanks.
What about to record the associated transaction with the reminder? When I try to use reminder.getTransaction and sync that it doesn't show up as a new transaction. I guess I can create a new transaction and then just get the relevant fields one by one from the reminder; just wondering if there is a better way.
System closed this discussion on 01 May, 2020 11:10 PM.