1

I am new to Google apps script, i want to know how can you generate a bar-code from the 4 digit unique number generated from below script.

function SignOut(e) {
   var ss =  SpreadsheetApp.openById('1VbRt0Kt7KH8Asc_NfdDYhs7LYtxq5n5JxO8SJzD5GoM');
   var ss_live = ss.getSheetByName('Live');
   var codes = ss_live.getRange("I:I").getValues(); 
   var time_out = Utilities.formatDate(new Date(), "GMT+11", "hh:mm a");
   var message;

   if(e.SignOutCode == ''){
     message = 'Please enter your Sign Out Code';
   }
   else{
     for(var i=0;i<codes.length;i++){
       if(codes[i] == e.SignOutCode){
         i++;
         ss_live.getRange([i],8).setValue(time_out);
         ss_live.getRange([i],10).setValue(e.SignOutCode);
         message =  'success';
         return message;
       }
     }
     message = 'failure';
   }
Kara
  • 6,115
  • 16
  • 50
  • 57
Sam Aarius
  • 11
  • 1
  • Take a look at [this](https://stackoverflow.com/a/28097579/7215091). [This](https://stackoverflow.com/a/35703395/7215091) look pretty interesting also. – Cooper Dec 12 '18 at 01:41

0 Answers0