How to update google sheet data to simple proses without Google Sheet CRUDQ II
CRUDQll is good but very bigger process.
I have need simple process. Its possible?
If its possible then please give me Sheet script and block.
How to update google sheet data to simple proses without Google Sheet CRUDQ II
CRUDQll is good but very bigger process.
I have need simple process. Its possible?
If its possible then please give me Sheet script and block.
Here is my collection.
Judge for yourself which is easiest ...
Also see this tutorial ...
There will be an error message at the bottom of that html text
Does ReadAll work for you ?
@TIMAI2
Yes, Readall is working..... & list view also work But only Update data and create new data not working. When click updateRecord & Create Record showing This error Massage.
what can I do now?
What is the error message?
Please copy the entire error message (html) and post it here. If you can do this for both Create and Update it would save time.
googlelogo_color_150x54dp.png) no- repeat;margin-left:-5px}@media only scree and (min-resolution:192dpi) {#logo{background:url(//www.google.com images/branding/googlelogo/2x/ googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100% ;-moz-border-image:url(// www.google.com/images/branding/ googlelogo/2x/ googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel- ratio:2){#logo{background:url(// www.google.com/images/branding/ googlelogo/2x/ googlelogo_color_150x54dp.png) no-repeat;- webkit-background-size:100% 100%}} #logo{display:inline-block;height:54px;width: 150px}
400. That's an error.
Your client has issued a malformed or illegal request. That's all we know.</ ins> Ser
OK, it is currently a problem in the app / blocks, for the URL being sent.
Check the values you use for script, Id, sheet, and look at what the URL is like for create or update. You can share these back here.
Did you try this first with my sample data ?
Did that work for create and update ?
@TIMAI2
My dear,
I am Uploaded your aia file and change only 2 factor
facing any problem?
@Spicy_Topics
I humbly request to you Please see my Above massage.
I am facings 2 problem.
when I click updateRecord or Create new button showing this massage. but Google sheet data not updated or not create new records. but When I click delete button This button are working, deleted data from Google sheet, & ReadAll Record Are working Properly.
What is the problem only for updating data?
I have tested my original project, the one I used to make the video. This still works fine, I can create and update records. There is nothing wrong with the script or the blocks with the spreadsheet data layout I have shown
You also changed the SHEETNAME (as seen in your blocks), and your spreadsheet is quite different.
You should start again, run a test using the data I supplied, if only to prove to yourself that everything works. Make a backup of your working project for reference.
Then change one thing at a time, testing as you go, until you find what it is you have changed that breaks things. My guess is your spreadsheet layout. Reorganise the columns so that they are in a similar order to my example data.
If any extra single text or comma or semi col added in the above scripts then it will report the bive error.
If possible share your script code..
Because unnoticed single hyphen will cost much
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");
}
}
This is my Sheet Script. I am only Copy this Script from @TIMAI2 Simple CRUD with Google Sheets and Apps Script (fixes Hay Kel flaws...)
post And paste in my sheet.
Dear Sir, I Start again, I am just upload your aia file, Copy Script and pest my new Sheet, Change Script link, Sheet ID & Sheet Name Like as your sheet. But I facing Same Problem. ReadAll DataAnd Read Record only working But Update & Create new Data Not working show same error massage.