function doPost(e) {
addClient(e);
}
function addClient(e) {
var ss = SpreadsheetApp.openById("1lOkkIeMBtQn1Ok4-zqEqmmJNN1Ay-rf7OER8uZWOe9s");
SpreadsheetApp.setActiveSheet(ss.getSheets()[3]);
var name = e.parameter.client_name ;
var mail = e.parameter.client.email ;
var adress = e.parameter.client_adress ;
var zip = e.parameter.client_zip ;
var country = e.parameter.client_country ;
var tel = e.parameter.client_tel ;
var shipping = e.parameter.client_shipping;
var lastrow = ss.getActiveSheet().getLastRow();
var id = ss.getActiveSheet().getRange(lastrow, 1).getValue()+1 ;
ss.getActiveSheet().appendRow([id,name,mail,adress,country,zip,tel,shipping]);
}
function doPost(e) {
addClient(e);
}
function addClient(e) {
var ss = SpreadsheetApp.openById("1lOkkIeMBtQn1Ok4-zqEqmmJNN1Ay-rf7OER8uZWOe9s");
var sheet = ss.getSheets()[3];
var name = e.parameter.client_name ;
var mail = e.parameter.client.email ;
var adress = e.parameter.client_adress ;
var zip = e.parameter.client_zip ;
var country = e.parameter.client_country ;
var tel = e.parameter.client_tel ;
var shipping = e.parameter.client_shipping;
var lastrow = sheet.getLastRow();
var id = sheet.getRange(lastrow, 1).getValue()+1 ;
sheet.appendRow([id,name,mail,adress,country,zip,tel,shipping]);
}
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/952a8089-323d-4e2e-852c-619719dae4e6n%40googlegroups.com.
Since the code is in the doGet function, when you make any changes, you need to publish a new version of the webapp and not just update. I do not know why Google does not update the code if you just do an update, but certainly publishing a new version works.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/6ba64e60-0303-4eb1-ad72-97154f9c1879o%40googlegroups.com.
Since the code is in the doGet function, when you make any changes, you need to publish a new version of the webapp and not just update. I do not know why Google does not update the code if you just do an update, but certainly publishing a new version works.
From: google-apps-sc...@googlegroups.com <google-apps-sc...@googlegroups.com> On Behalf Of Esteban Michel
Sent: July 14, 2020 8:21 PM
To: Google Apps Script Community <google-apps-sc...@googlegroups.com>
Subject: [Apps-Script] Re: cannot set active sheet
Yes i was opening my sheet by name before. I change to my current code to see if it would make a difference.
It didn't :)
I guess im in for some troubleshooting :)
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-community+unsub...@googlegroups.com.
Thank you so much george. You saved my day.... i was really getting nut here.
So it worked by creating a new script and it got me thinking so i guess i have the answer to your wuestion...
I needed to increment the version. Moved from 1 to 2 and it worked like magic!!!
On Tuesday, July 14, 2020 at 10:09:15 PM UTC-6, George wrote:
Since the code is in the doGet function, when you make any changes, you need to publish a new version of the webapp and not just update. I do not know why Google does not update the code if you just do an update, but certainly publishing a new version works.
From: google-apps-sc...@googlegroups.com <google-apps-sc...@googlegroups.com> On Behalf Of Esteban Michel
Sent: July 14, 2020 8:21 PM
To: Google Apps Script Community <google-apps-sc...@googlegroups.com>
Subject: [Apps-Script] Re: cannot set active sheet
Yes i was opening my sheet by name before. I change to my current code to see if it would make a difference.
It didn't :)
I guess im in for some troubleshooting :)
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/6ba64e60-0303-4eb1-ad72-97154f9c1879o%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/7d783942-e724-4b4a-be79-33f7fb647beao%40googlegroups.com.
Its because I also wasted lots of time thinking an update should “update the code” but it does not. This could be a bug at Google and maybe someone should open a ticket on it. But it has been like this for years..
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CAHNYQLgQLHVMn1Z5S%2BM9uV%2BP_KAYid4jEGW061v1MOCynNdj7w%40mail.gmail.com.