Sorry Im Hungaryan
I understand You mean i change txtbox to label?
then you can see what is coming back, error or other issue with content
That script will only really work for the example data and app shown in the video.
Also, as previously advised, you probably need to clean your data on your sheet of all emoji and images
I now have a new script, that will work on most spreadsheets, and example app, but I need to write this up.
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");
}
}