When I use onOpen(), I can create a popup ui.alert but ui.prompt does not work.
For example:
function onOpen() {
var ui = SpreadsheetApp.getUi(); // get ui for alert
ui.alert('Hello!')
}
works but:
function onOpen() {
var ui = SpreadsheetApp.getUi(); // get ui for alert
var nname = ui.prompt('What is your name?', 'E.G.: J Smith', ui.ButtonSet.OK)
}
does not!
Has anyone else found this issue? Am I doing something wrong?
Many thanks,
G
Edit:
If I run both like this, the ui.alert works but the ui.prompt does nothing. If I debug the function, both work.
function onOpen() {
var ui = SpreadsheetApp.getUi(); // get ui for alert
ui.alert('Hello!')
var nname = ui.prompt('What is your name?', 'E.G.: J Smith', ui.ButtonSet.OK);
}