Is there a way to play a sound whenever there is new data entered by a user in certain cell? The use case is to give a sound notification to the user just like Uber app gives a sound notification to the driver when there is a ride request.
More specifically: when Col_1 has been changed, my code records day and hour of this change in Col_2. I need my code also notify of this change with a sound in real time.
This is my code:
function onEdit(event){
var Col_1 = 11;
var Col_2 = 12;
var changedRange = event.source.getActiveRange();
if (SpreadsheetApp.getActiveSheet().getName() == "Planilla madre") {
if (changedRange.getColumn() == Col_1) {
var state = changedRange.getValue();
var adjacent = event.source.getActiveSheet().getRange(changedRange.getRow(),Col_2);
var timestamp = new Date();
switch (state) {
case "":
//
adjacent.clearContent();
break;
default:
//
adjacent.setValue(timestamp);
break
}
}
}
}