When selecting a record, the alert is set to undefined