Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't access to event posted values
    text
    copied!<p>i'm writing a little google apps script which allow to select several names among a list of developpers. But in my doPost(e) method, i can't access to the array of posted values (it's undefinded), event if i check all the checkboxes...</p> <pre><code>function onOpen() { var ss = SpreadsheetApp.getActiveSpreadsheet(); // add the new menu var menuEntries = []; menuEntries.push({name: "Edit page", functionName: "start"}) ss.addMenu("My tools", menuEntries); } function start() { var app = UiApp.createApplication(); app.setTitle("Edit page"); var formPanel = app.createFormPanel(); var mainPanel = app.createVerticalPanel(); var gridPanel = app.createGrid(1, 2); // developpers var developperPanel = app.createVerticalPanel() var developpers = []; developpers.push( "John", "Peter", "Max", "Johnny" ); for (var i = 1; i &lt; developpers.length; ++i) { var checkbox = app.createCheckBox(developpers[i]).setName("dev"+i); developperPanel.add(checkbox); } gridPanel.setWidget(0,0,app.createLabel("Developpers : ")); gridPanel.setWidget(0,1,developperPanel); // submit button mainPanel.add(gridPanel); mainPanel.add(app.createSubmitButton().setText("OK")); formPanel.add(mainPanel); app.add(formPanel); var ss = SpreadsheetApp.getActive(); ss.show(app); } function doPost(e) { var app = UiApp.getActiveApplication(); app.add(app.createLabel(e.values[0])); // Here is the error. return app; } </code></pre> <p>In the exemple, the list is fixed but in my real script, i create the list thanks to the Spreadsheet.</p> <p>Thanks</p> <p>Max</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload