I have a drop down that is the word submitted is selected a prompt pops up asking a question. If the user clicks no or cancel I need that active cell to revert back to an empty drop down (like when you click delete and it resets the drop down)
Here is the code I do have:
function sendMailEdit(e) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var ui = SpreadsheetApp.getUi();
var rData1 = e.source.getActiveSheet().getRange(e.range.rowStart,1,1,15).getValues();
var lj1 = rData1[0][0];
if (ss.getSheetName() == 'Design Doc Queue' &
ss.getActiveCell().getColumn() == 6 &
ss.getActiveCell().getValue() == "Submitted") {
var alertPromptText = '⚠️ Are you sure you want to submitt these drawings '+ lj1 +' for review? ';
var promptResponse = ui.alert(alertPromptText, ui.ButtonSet.YES_NO_CANCEL);
if (promptResponse == ui.Button.YES) {
// CHECK START
// variable email needs to be fixed. It gets the column of values.
// it needs to be converted to a comma separated list of recepients
var email = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Email").getRange(1, 1, 100).getValues();
// CHECK END
var rData = e.source.getActiveSheet().getRange(e.range.rowStart,1,1,15).getValues();
sendEmail(email,rData);
}
else if(promptResponse == ui.Button.Close){
var clear = ss.getActiveCell().getColumn() == 6;
clear.clearNote();
return;
}
}
I have tried multiple variations on this but no luck. Any advice would be grwatful.
D