web-applications

google.script.run.withSuccessHandler don't return value

泪湿孤枕 提交于 2020-12-26 08:31:59
问题 it is getting me crazy, the code was working yesterday, but not anymore. I tried to check all syntax again, but the issue still persists. this server-side request from google sheets, shows value on server side ( Logger.log() ), but returns null in client side! Can you help me to find the issue, please! function supervisorLine(lineData){ if (lineData== 'Name Value is not VALID!' ) { console.log("Supervisor Name Issue!"); } else { document.getElementById('Team').value= lineData[7]; document

google.script.run.withSuccessHandler don't return value

蹲街弑〆低调 提交于 2020-12-26 08:28:18
问题 it is getting me crazy, the code was working yesterday, but not anymore. I tried to check all syntax again, but the issue still persists. this server-side request from google sheets, shows value on server side ( Logger.log() ), but returns null in client side! Can you help me to find the issue, please! function supervisorLine(lineData){ if (lineData== 'Name Value is not VALID!' ) { console.log("Supervisor Name Issue!"); } else { document.getElementById('Team').value= lineData[7]; document

Google Script: Failed request and returned code 500

一笑奈何 提交于 2020-12-15 05:21:48
问题 I'm experiencing an error called code 500 . The script works fine if I'm using it in the owner account, but if I'm going to open the file as a user/editor, the code 500 error shows. Here is the link to the sample spreadsheet that I'm working on. I tried asking here but seems like it is a little complicated so I created a new single spreadsheet so that it can be easily identified the error. Here's the code function doGet(e) { this[e.parameter.run](e.parameter.sheetName || null); return

Easiest way to wait for google server-side function to resolve

生来就可爱ヽ(ⅴ<●) 提交于 2020-12-12 11:31:07
问题 I need the client side code to wait for the called server side (google.script.run) function to complete before running any more code. The withSuccessHandler(successFunc) does not cause lines of code that are after the server call to wait. What I've done: async function func(){ await google.script.run.withSuccessHandler(myFunc).serverFunc(); console.log("done"); } func(); How can the code wait to execute the console.log line until after the server side function resolves? 回答1: How about this

Easiest way to wait for google server-side function to resolve

依然范特西╮ 提交于 2020-12-12 11:30:31
问题 I need the client side code to wait for the called server side (google.script.run) function to complete before running any more code. The withSuccessHandler(successFunc) does not cause lines of code that are after the server call to wait. What I've done: async function func(){ await google.script.run.withSuccessHandler(myFunc).serverFunc(); console.log("done"); } func(); How can the code wait to execute the console.log line until after the server side function resolves? 回答1: How about this

The Java Script Results not showing in HTML

。_饼干妹妹 提交于 2020-12-06 15:54:11
问题 I wrote a GAS code to check if the employee is In or Not in (extracting data from Google sheets). The console log give me the right answer but When I click on the button the answer doesn't appear at the front end. Can you help me to troubleshoot on where I went wrong? <div> <script> function onStatus(notify) { var employee = "John Peter"; var ss = SpreadsheetApp.getActiveSpreadsheet(); var mainSheet = ss.getSheetByName("MAIN"); var data = mainSheet.getDataRange().getValues(); for (var j = 0;

The Java Script Results not showing in HTML

馋奶兔 提交于 2020-12-06 15:52:58
问题 I wrote a GAS code to check if the employee is In or Not in (extracting data from Google sheets). The console log give me the right answer but When I click on the button the answer doesn't appear at the front end. Can you help me to troubleshoot on where I went wrong? <div> <script> function onStatus(notify) { var employee = "John Peter"; var ss = SpreadsheetApp.getActiveSpreadsheet(); var mainSheet = ss.getSheetByName("MAIN"); var data = mainSheet.getDataRange().getValues(); for (var j = 0;