Professional Documents
Culture Documents
Codigo Text
Codigo Text
//to create the instance of the user-interface environment to use the messagebox
features
var ui = SpreadsheetApp.getUi();
// Display a dialog box with a title, message, and "Yes" and "No" buttons. The
user can also
// close the dialog by clicking the close button in its title bar.
var response = ui.alert("EDITAR", 'EDITAR INFORMACIÓN?',ui.ButtonSet.YES_NO);
// Checking the user response and proceed with clearing the form if user selects
Yes
if (response == ui.Button.NO)
{return;//exit from this function
}
datasheet.getRange(iRow,
1).setValue(shUserForm.getRange("F7").getValue()); //Employee ID
datasheet.getRange(iRow,
2).setValue(shUserForm.getRange("F10").getValue()); //Employee Name
datasheet.getRange(iRow,
3).setValue(shUserForm.getRange("F12").getValue()); //Gender
datasheet.getRange(iRow,
4).setValue(shUserForm.getRange("F14").getValue()); // Email ID
datasheet.getRange(iRow,
5).setValue(shUserForm.getRange("K10").getValue()); //Department
datasheet.getRange(iRow,
6).setValue(shUserForm.getRange("K12").getValue());// Address
datasheet.getRange(iRow,
7).setValue(shUserForm.getRange("K14").getValue());// Address
datasheet.getRange(iRow,
8).setValue(shUserForm.getRange("K16").getValue());// Address
shUserForm.getRange("F7").clear();
shUserForm.getRange("F10").clear();
shUserForm.getRange("F12").clear();
shUserForm.getRange("F14").clear();
shUserForm.getRange("K10").clear();
shUserForm.getRange("K12").clear();
shUserForm.getRange("K14").clear();
shUserForm.getRange("K16").clear();
valuesFound=true;
return; //come out from the search function
}
}
if(valuesFound==false){
//to create the instance of the user-interface environment to use the messagebox
features
var ui = SpreadsheetApp.getUi();
ui.alert("INFORMACIÓN NO ENTRRADA");
}