Scanalyzer + ☁ = 

We've done it again!  We're happy to present you with our "Scan to the Cloud" feature, available on Scanalyzer and Scanalyzer Pro.  Now you can scan a barcode and send the results, even a userid and GPS location, to a Google Spreadsheet.  That's great all by itself, but how about extending that by processing the data and displaying some real-time information on a website?

The following example does just that.  Please note the privacy advisor that accompanies the Quick Configuraiton Code before you scan it.  Instructions that walk you through how to set this up follow the demo.  Enjoy!

Data Collection Demo



Start scanning and refresh the page to watch the results change:


QUICK CONFIGURATION CODE


PRIVACY

This Code
INSTANTLY

Sends
BARCODE
LOCATION
TIMESTAMP


To
SCANALYZER
GOOGLE DOCS
THE PUBLIC INTERNET






 


 

 DOG  CAT


Walkthrough



https://docs.google.com/a/mcdanielar.com/spreadsheet/ccc?
key=0AmE18Htty58LdHg1azVMMWtlWTRoZEtySjhpMTFST2c&hl=en_US#gid=2

    • We used a Google Site for our example, so that's where we made the script...
function doGet(e) {  
  
  //Initialize the app...
  var app = UiApp.createApplication();
  var vPanel = app.createVerticalPanel();
    
  //Create a welcome message and data labels 
  var welcomeLabel = app.createLabel("You sent:").setStyleAttribute("fontSize","16px");  
  var dataLabel = app.createLabel(e.parameter.data);
  
  //Add the labels to the vPanel
  vPanel.add(welcomeLabel);  
  vPanel.add(dataLabel);
  
  //Add the vPanel to the App
  app.add(vPanel);
  
  //Open the spreadsheet by its key value...
  var ss = SpreadsheetApp.openById("0AmE18Htty58LdHg1azVMMWtlWTRoZEtySjhpMTFST2c");//key from url
  SpreadsheetApp.setActiveSpreadsheet(ss);
  var mysheet = ss.getActiveSheet();
      
  //Insert a new row at the beginning of the spreadsheet
  mysheet.insertRowsBefore(1,1);
  
  //Put the cursor in cell A1
  mysheet.setActiveCell("A1");
  
  //Split the submitted data at tab marks and store in an array...
  var dataArray = e.parameter.data.split("\t");
  
  //Set the value of the cell(s) to the given data
  mysheet.getRange(1, 1, 1, dataArray.length).setValues([dataArray]);
    
  return app;  

    • On the Share menu, Publish the Script as a Service and grab the URL for use in your configuration code.
    • You'll need to add &data= to the end of the URL, and then tack on the scanalyzer tags of your choosing.  Note: We're using %09 for the tab character.

  • Configure Scanalyzer Pro with your automation string.  You can cut and paste ours if you want to test it out:
https://sites.google.com/a/macros/mcdanielar.com/exec?service=AKfycbyXKkVFgb3cnXWeZDPrrPNz92PSvI9yrsAg&data=<barcode>%09<latitude>%09<longitude>%09<timestamp>