Skip to content
Advertisement

google.script.run problem on Google Apps Script

I am working on a Google Apps Script project, and I have made a html form that will automatically paste the user answers in a sheet.

My problem is the following: I need to add elements in a drop down list with a separated form. To do this, I have made a function that will read some cells and add their value in a “list”. I joined that list to return a string named listVlans.

This is my GS:

JavaScript

There is no problem here, it returns a big string (listVlans) with all the elements of my list separated by ,.

My problem is that I would like to import this listVlans from the .gs to my html script to actualize my drop down list elements in function of my sheet’s values.

JavaScript

The problem is that the console.log(newList) is just printing undefined, but it should print my big joined string…

Have you had this problem? Thank you.

Advertisement

Answer

Welcome Thibaud, the problem is not here, you have to evaluate your form by a script included in gs like this one (change names as necessary, inside this script)

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement