I've created a google scripts app that gives the user a prompt and accepts a single input, which is then used later on within the script (I'm querying an API using and outputting the results into Google sheets and need username / pwd etc).
My code so far:
var ui = SpreadsheetApp.getUi();
var result = ui.prompt('Please enter API password',
ui.ButtonSet.OK_CANCEL);
var button = result.getSelectedButton();
var text = result.getResponseText();
if (button == ui.Button.OK) {
// User clicked "OK".
var pw = text;
}
However, I would like to increase this to four string responses that are all captured as variables that are then used in the rest of the script. Is this possible without having multiple prompts?
Thanks for your help!
Anant