Hi all. Im busy writing an app to log work hours to google sheets but struggling to write to different sheets,
Here is part of the blocks:
and here is the script:
function doGet(e) {
-
var ss = SpreadsheetApp.openByUrl("**************************");
-
var sh = ss.getSheetByName(“Francois”);*
-
addUser(e,sh);*
}
function doGet(f) {
-
var ss = SpreadsheetApp.openByUrl("*****************");
-
var sheet = ss.getSheetByName(“Wimpie”);*
-
addUser(f,sheet);*
}
*function doPost(e) { *
-
var ss = SpreadsheetApp.openByUrl("***************************");
-
var sh = ss.getSheetByName(“Francois”); *
-
addUser(e,sh);*
}
*function doPost(f) { *
-
var ss = SpreadsheetApp.openByUrl("*****************************");*
-
var sheet = ss.getSheetByName(“Wimpie”); *
-
addUser(f,sheet);*
}
function addUser(e,sh) {
-
var F_Date= e.parameter.F_Date ; *
-
var F_Time_In= e.parameter.F_Time_In ;*
-
var F_Time_Out= e.parameter.F_Time_Out ; *
-
var F_Location= e.parameter.F_Location ;*
-
var F_Total_Time= e.parameter.F_Total_Time ;*
-
sh.appendRow([F_Date,F_Time_In,F_Time_Out,F_Location,F_Total_Time]);*
}
function addUser(f,sheet) {
-
var W_Date= f.parameter.W_Date ; *
-
var W_Time_In= f.parameter.W_Time_In ;*
-
var W_Time_Out= f.parameter.W_Time_Out ; *
-
var W_Location= f.parameter.W_Location ;*
-
var W_Total_Time= f.parameter.W_Total_Time ;*
-
sheet.appendRow([W_Date,W_Time_In,W_Time_Out,W_Location,W_Total_Time]);*
}
So both the URL are correctly inputted. Can anyone check if the script are correctly or how can i change the app blocks to specify the sheet names