Read googlesheet error


image

Hello I am Hungarian boy :slight_smile:

I am a beginner coder.
I have app and i want read send delete and modify to and from googlesheet.

But if i click READ ALL button its cant read file from googlesheet to listview :frowning:

Can me help anybody please? <3 Thanks a lot from Hungary <3

It is not possible to read any of your blocks.

In the Blocks Editor, right click on some white space and download blocks as an image. Upload that image here.

1 Like

Ohh sorry i sent in link because too large :slight_smile: blocks (2).png - Google Drive
here is my block

SARVARIEGER_TICKETING (ERROR).aia (763.9 KB)

Looks like the error is being raised here:

which indicates a problem upstream with your google apps script.

  1. Is your script correctly deployed as a web app?
  2. Try testing your readall url in a browser (this may return the full response which you can post here for examination)
  3. Post your script contents here (as text)

Hey, First thanks your help. its my script link:

and my script:

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("A ticket törölve!");
}

//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("A ticket frissült!");
}

//CREATE NEW RECORD
else if ( e.parameter.FN == "Create" ) {
var data = JSON.parse(e.parameter.DATA);
sh.appendRow(data);
return ContentService.createTextOutput("Új elem felvéve!");
}

}

You probably do not need this (you are returning a string/text not JSON)

Have you tried 1 or 2 in my response above ?

I try


You mean i delete line 10?
or i delete line 16?

Or i delete 10 and 16 line?

If you read the guide, I clearly stated that you do not need to change anything in the script for it to work.

Ahh okay, but can you help me think what is the problem have you idea?