How can I trigger a smart rule on moving an item to the Trash?

I’ve just had a load of reminders pop up for items I’ve deleted. I don’t really want to be reminded about something if I’ve deleted it, so I tried to make a smart rule that would remove the reminder from anything that’s moved to the Trash.

Unfortunately, I can’t work out how to do it. I don’t seem to be able to select the Trash under “Search in”, and there isn’t an “On Deleting” trigger.

Obviously, I don’t want to remove reminders when I’m moving an item from one folder to another — just when I’m moving it to the Trash.

(Or, alternatively, could DT3 ignore reminders on items that are in the Trash? I’m not sure what the use case would be for having the reminders still fire, though I bet somebody has one :​)

I don’t use reminders in DT but I imagine if you empty the trash the reminders would stop. Can’t be reminded about a file that doesn’t exist!

3 Likes

I agree that it seems simpler to just empty the trash regularly.

However, a future release should add your desired trigger:

Then you could combine that with the “Remove Reminder” smart rule script.

1 Like

I agree the Trash should be routinely emptied.
That being said, you don’t necessarily need a smart rule script and in fact, this is something that can already be accomplished quite simply…

  1. Select the Trash of the specific database.
  2. Open the Annotations & Reminders inspector.
  3. Set a Daily reminder.
  4. Set an alarm as an Execute AppleScript and enter this simple snippet…
on performReminder(theRecord)
	tell application id "DNtp" to set reminder of (children of theRecord) to missing value
end performReminder

Then at the specified time, the reminders should be cleared on any items in the Trash.

Again, I’m not saying this is the best option over keeping the Trash clean, but it certainly addresses this issue.

4 Likes

I never used reminders in DT, so that didn’t occur to me at all. Nice!

Thanks @BLUEFROG — running script each day at 03:45 should do the job, unless I set any reminders to fire between midnight and 03:45, which seems unlikely :slight_smile:

The reminders that were firing were set only a couple of days in advance, so unless I emptied the Trash really regularly it wouldn’t have helped much!

1 Like