Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 74406

How to append data?

$
0
0

here's my code in code.gs

 function appendData(name1,phone2,drop1,email) {
 var ws = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("page");
 ws.appendRow([name1,phone2,drop1,email]);

}

function getuser(){
  return Session.getEffectiveUser().getEmail();
}

here's my code in userform.html

var name1 = nameBox.value;
              var phone2 = phoneBox.value;
              var drop1 = dropBox.value;
              var email = google.script.run
    .withFailureHandler(function(err){
        console.error("error occured", e);
    })
    .withSuccessHandler(function(res){
        alert(res);
    })
    .getuser();



    google.script.run.appendData(name1,phone2,drop1,email);

Newbie here. I know my code will pop out a message showing my email address...but what I want to do is to append the email address from this: google.script.run.appendData(name1,phone2,drop1,email);

it does append name1,phone2, and drop1, but not email how do I do that?


Viewing all articles
Browse latest Browse all 74406

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>