Google Script to see if text contains a value

前端 未结 4 1191
既然无缘
既然无缘 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条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-06 22:37

    Update 2020:

    You can now use Modern ECMAScript syntax thanks to V8 Runtime.

    You can use includes():

    var grade = itemResponse.getResponse();
    if(grade.includes("9th")){do something}
    

提交回复
热议问题