Google Script to see if text contains a value

前端 未结 4 1195
既然无缘
既然无缘 2021-02-06 22:25

I have a google form that when the user submits it will trigger my function to run which is creating a summary of what they submitted as a Google Doc. I know it can automaticall

4条回答
  •  梦毁少年i
    2021-02-06 22:48

    Google Apps Script is javascript, you can use all the string methods...

    var grade = itemResponse.getResponse();
    if(grade.indexOf("9th")>-1){do something }
    

    You can find doc on many sites, this one for example.

提交回复
热议问题