error when activating a script with formsubmit

0

The following is the email I received when I failed to complete the form for the first time.

Your script, Query and Procedures Form, has not been executed correctly. Here is a summary of the errors. To configure the triggers for the script or change the configuration to receive future error notifications, click here.

The document Query and procedures form uses the script.

I'm getting this error:

  

Start: 10/18/17 12:34 Function: showQuestionNumber Message from   error: FormApp.getUi () can not be used from this context. (line 5,   "Code" file) Activation: formSubmit End: 10/18/17 12:34   Sincerely,

     

Google Apps Script

The code of the script is very simple:

function showQuestionNumber() {

      var questionnumber=5

      FormApp.getUi().alert('Su consulta tramitará con el número:    '+ questionnumber)
    }

I thank you for helping me solve this problem. regards Salvador

    
asked by Salvador 18.10.2017 в 18:12
source

1 answer

0

As indicated by the error message FormApp.getUI() can only be used when executing the script in the context of the Google form editor, it is not possible to call it using the activator "when sending form" as well as it is not possible to execute scripts in the view to answer forms.

    
answered by 18.10.2017 в 22:14