Google Spreadsheet: Integrated spreadsheet is not triggering custom script upon submission.

  • davidyatir
    Asked on October 6, 2016 at 4:49 PM

    Hi

    I have integrated my form with a google spreadsheet. the problem is this:

    I have some scripts running on the spreadsheet - all kinds of statistics, preventing multiple registration etc.

    the scripts need to be triggered. usually I trigger them upon form submit. when I realized that the trigger is not sensing the form submit, probably because the form is external to Drive, I have tried triggering on sheet change. Unfortunately, this doesn't work also.

    its important to say that I have the exact same scripts running OK with internal google forms. also when I run the script manually after form submission, it works fine. the only problem is with the triggering.

    Hope you can think of a solution because without the capability to run statistics the form is useless for me

     

    Regards

     

    Assaf

  • Kevin Support Team Lead
    Replied on October 6, 2016 at 9:08 PM

    I found some samples in the Google documentation that I have applied to a integrated with JotForm spreadsheet, here is the link to the documentation that I found: https://developers.google.com/apps-script/guides/triggers/ 

    I have applied the onEdit() function to a spreadsheet and I can see it works when an information is manually edited or when the spreadsheet is manually opened, but changes upon form submission do not seem to trigger the script. 

    Here is how I have set up the script shown in the Google documentation: 

    Google Spreadsheet: Integrated spreadsheet is not triggering custom script upon submission Screenshot 20

    I'm not sure if this has to do in how the Google API works since when a record is updated in the form it is also updated in the spreadsheet, but it does not seem to be updating the last edited or last opened date. 

    I will forward this thread to our second level so our developers may take a look into this, we will update you via this thread as soon as we get updates.

     

  • davidyatir
    Replied on October 7, 2016 at 3:50 AM

    Thanks Kevin

    Maybe its because the Jot form is integrating directly with the spreadsheet so the OnFormSubmit trigger is not aware of that? or is it that you are interfacing the sheet the same way a google form would do? 

    I will wait for further updates

  • Rose
    Replied on October 7, 2016 at 4:09 AM

    This issue has been already forwarded to the second level. When they come to you with a solution, you will be notified under this thread. 

    In the meantime, If you have more any other questions, please feel free to open a new thread.