How to select the alert (or no alert) that an event triggers