Google sheet lire et envoyer les données

Is the data being written to the spreadsheet ?

oui les données sont dans la feuille
voila mes blocs


o

This is wrong!

and you do not set reponse to WriteReadReport

Like so:

Please do not just copy this. read and understand what is required, then apply the blocks logic to your own blocks.

oui je vais essayer , je fais beaucoup de modification car pour moi c'est difficile ....

J'ai composé mes blocs pour lire les données dans chaque étiquette, j'arrive à lire les données dans chaque étiquette mais les textes sont entourés du signe " et du signe [ ?

  • la date n'affiche pas la date sélectionnée ?
  • et je ne peux pas lire les Emoji ?
    pouvez vous m'aider

voilà mes blocs

I do not know why you have done that....

Could I suggest that you make a new project/script/sheet and follow my example exactly. This should work just as I have shown.

When you have that working, you should understand how the aia project/script/spreadsheet work with each other, and then how you should apply this to your own project.

You may also find this guide useful

je ne comprends pas votre réponse, j'ai fais ça pour lire les données envoyées dans chacune de leurs étiquettes et ça fonctionne (je ne veux pas lire toutes les données dans la même étiquette comme votre exemple), c'est juste que quand je lis les données il y a des guillemets qui entourent mes phrases exemple : si j'envoie coq au vin, je lis "coq au vin" avec le signe " alors que je ne veux pas. comment enlever les guillemets ?

29f6e4bf1e9b385dbfe91221d3b2ca05fd6a9026

As previously indicated, you need to convert the responseContent to an AI2 list, then you can extract each item in the list to a label, with no quotation marks displayed.

image

Merci pour votre aide les guillemets ne sont plu affichés

avons-nous fini ?

oui désolé et merci de votre patience

à bientôt et bon codage

Googlesheet problème pour se connecter et lire les données avec 1 bouton

bonjour, j'adore compliquer les choses. j'ai un bouton pour se connecter et je cherche à lire les données avec le même bouton , c'est à dire que lorsque l'utilisateur se connecte il ouvre sa page de données qui sont déjà écritent . J'ai déjà essayé mais j'ai un message d'erreur :
The operation select list item cannot accept the arguments: , ["connecté"], [1]
Note: Vous n'allez pas voir une autre erreur rapportée pour 5 secondes.
et c'est bizarre car je peux lire quand même les données, je n'arrive pas à résoudre le problème ....
voici mes block

mon script

function doGet(e) {
 
  var ss = SpreadsheetApp.openById('1BSUDHn08h6YlrtgfeoQEVhjdvNp3rGPxZiTVq9r-bSY');
  var sheet = ss.getSheetByName("Sheet1"); 
  var sh = ss.getSheetByName("Sheet2"); 
  var nom = e.parameter.nom ; 
  var motdepasse = e.parameter.motdepasse ;
  var msg;


  if ( e.parameter.func == "register" ) { 
    sheet.appendRow([nom,motdepasse]);
    return ContentService.createTextOutput("Nouveau compte"); 
  } 
  
  else if ( e.parameter.func == "testLogin" ) {
    var msg = "Information incorrecte";
    var loginData = sheet.getDataRange().getValues();
    for ( var i = 0; i < loginData.length; i++ ) {
      if ( nom == loginData[i][0]  && motdepasse == loginData[i][1] ) {
        msg = "connecté";
    }
    
  }
    return ContentService.createTextOutput(msg);

    
  }

  else if ( e.parameter.func == "supprimer" ) { 
   var loginData = sheet.getDataRange().getValues();
   for (var i = 0; i < loginData.length; i++ ) {
   if ( nom == loginData[i][0]  && motdepasse == loginData[i][1] ) {
        msg = "compte supprimé";  
        sheet.deleteRow(i+1);
    }
   }
   var reportData = sh.getDataRange().getValues();
   for (var i = 0; i < reportData.length; i++ ) {
     if ( nom == reportData[i][0] ) {
          msg = " compte supprimé";  
          sh.deleteRow(i+1);
     }
   }
   return ContentService.createTextOutput(msg);
    }
  

   if (e.parameter.func == "WriteReadReport") { 
    var nom = e.parameter.nom ;
    var date = e.parameter.date ;
    var repas = e.parameter.repas ;
    var change = e.parameter.change ;
    var sieste = e.parameter.sieste ;
    var soins = e.parameter.soins ;
    var transmission = e.parameter.transmission ;
    sh.appendRow([nom,date,repas,change,sieste,soins,transmission]);
    SpreadsheetApp.flush();
    var ref = [];
  var rg = sh.getDataRange().getValues();
  for (var i=0;i<rg.length;i++) {
    if (rg[i][0] == nom) {
      ref.push(rg[i][0]);
      ref.push(Utilities.formatDate(rg[i][1], "GMT", 'dd-MM-YYYY'));
      ref.push(rg[i][2]);
      ref.push(rg[i][3]);
      ref.push(rg[i][4]);
      ref.push(rg[i][5]);
      ref.push(rg[i][6]);
    }
  }

  return ContentService.createTextOutput(JSON.stringify(ref)).setMimeType(ContentService.MimeType.JSON);

  }

 if (e.parameter.func == "Read"){
     
    SpreadsheetApp.flush();
    var ref = [];
  var rg = sh.getDataRange().getValues();
  for (var i=0;i<rg.length;i++) {
    if (rg[i][0] == nom) {
      ref.push(rg[i][0]);
      ref.push(Utilities.formatDate(rg[i][1], "GMT", 'dd-MM-YYYY'));
      ref.push(rg[i][2]);
      ref.push(rg[i][3]);
      ref.push(rg[i][4]);
      ref.push(rg[i][5]);
      ref.push(rg[i][6]);
    }
  }
  return ContentService.createTextOutput(JSON.stringify(ref)).setMimeType(ContentService.MimeType.JSON);
}
  
}

Look again at your blocks here:

You appear to set up a call to testLogin but you never make the call, then you make a call to Read.

If you want to do both, then call the first, and whn you get a response in Web.GotText, call the second, or use what you have already learned, and develop your script to do both in one call !!

oui mais je voudrais connaitre une autre solution c'est pour ça que j'essaie autrement.
J'appel testLogin en premier et je croyais obtenir la réponse avec "reponse testLogin" de urlGET ?

je suis désolé mais je n'arrive pas à comprendre cette solution ! pouvez vous m'aider plus.

When you call to Web.Get you get the response in the block Web.GotText so, you need that block to check the response, to check if it is 'connected' or 'wrong information' and if it is 'connected' to call to Read. You will have the response to the call to Read in the same Web.GotText block>

Or, doing only a call to Web.Get, via script, obtain both informations...if the user registration data is right and then response can include the data of that user sheet.

(and sorry for interfering)

votre intervention est la bienvenue, je vais essayer

est ce que je dois modifier les blocs du bouton aussi ?
car j'ai fais ça mais ça ne fonctionne pas j'ai toujours le message d'erreur

I was only trying to explain you how the Web component works and how the response is received in the GotText block (you have only one GotText block for all the calling you do to the Web component),

In the call to Web component, you only have to call to testLogin in the button (or wherever you are calling it now) and, if the response is positive, then call to Read (that is what I'm understanding you want ).

When you call testLink you don't get the correct answer? Do you have the user registered yet? Uppercase/lowercase/whitespace in comparisons?