Now written up:
I have moved all your subsequent posts here
Lot if thanks your help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
i try it and i have message
when i click read all button:
- You did not need to edit the google apps script (This was the whole point of the exercise)
- You set the sheetId (the id of the spreadsheet) and the sheetname (the specific sheet in the spreadsheet) in the variables in the app
Ohhhh . Okaaay i tryyyy
Processing: Screenshot_2022-09-18-19-57-22-433.jpeg...
I not Edit tud script i get this message when I click readall btn
you have added wrong values in base url and sheet id ..
Pls read the @TIMAI2 guide properly.. There is no way to mis use the blocks. Everything were oerfectly placed.
I am surprised, How do you misread this blocks
Thank You.
Sorry I think I put link okaaay i try without😊
You have some problem with your script url code. Compare your script url with Timai2 script url.
Your url doesnot contain macros.. So your code returns html page with error
Run the base url in browser and capture the result and oaste here. Maybe Tim will help you further.
Also why do you edit this code? You should not.
Here SHEET ID and SHRET NAME text only should come.
function doGet(e) {
var ss = SpreadsheetApp.openById(e.parameter.SHEETID);
var sh = ss.getSheetByName(e.parameter.SHEETNAME);
var rg = sh.getDataRange().getValues();
//READ ALL RECORDS
if ( e.parameter.FN == "ReadAll" ) {
return ContentService.createTextOutput(JSON.stringify(rg)).setMimeType(ContentService.MimeType.JSON);
}
//READ SINGLE RECORD
else if ( e.parameter.FN == "ReadRecord" ) {
var ref = sh.getRange(parseInt(e.parameter.ROWID)+1,1,1,rg[0].length).getValues();
return ContentService.createTextOutput(JSON.stringify(ref)).setMimeType(ContentService.MimeType.JSON);
}
//DELETE SINGLE RECORD
else if ( e.parameter.FN == "Delete" ) {
sh.deleteRow(parseInt(e.parameter.ROWID) + 1);
return ContentService.createTextOutput("Record Deleted");
}
//UPDATE SINGLE RECORD
else if ( e.parameter.FN == "Update" ) {
var data = JSON.parse('[' + e.parameter.DATA + ']');
sh.getRange(parseInt(e.parameter.ROWID) + 1,1,1,data[0].length).setValues(data);
return ContentService.createTextOutput("Record Updated");
}
//CREATE NEW RECORD
else if ( e.parameter.FN == "Create" ) {
var data = JSON.parse(e.parameter.DATA);
sh.appendRow(data);
return ContentService.createTextOutput("New Record Appended");
}
}
Yeah, now your script url is correct.. Copy that url and paste into the blocks and try..
Meanswhile furst run the base url in any web browser and see the result
Not work
Just now i have tested.. No issue.. I created a empty sheet, paste the csv data and script code, deploy it and paste the script url, sheet id and name.. It gives back me result as shown in the video
As @TIMAI2 and i said, you made wrong somewhere else
On running your script url in browser, Do you get response like this?
test my sample aia
HKFix_blank(1).aia (9.2 KB)
Your spreadsheet ID does not look long enough...?
Good Morning!
I delete my all try (6projects) and i start new time AND IT WOOOORK!!!!!!!!!!!
Dear everybody!!!!
LOT OF THANKS!!!!!!!
THANK YOU THANK YOU THANK YOUUUUUU!!!!!!!!