Page 2 of 8

barcode scanner to invoke data from database

Posted: Thu Sep 26, 2013 6:10 pm
by Scott Schechtel

Ah, now were getting somewhere. Where do I do that in the app builder?

barcode

OOps! I now get the product info page after tapping on the Scan UPC button but it bypasses the actual scanning feature in the phone. Basically a button that takes me to the page without scanning a barcode


barcode scanner to invoke data from database

Posted: Thu Sep 26, 2013 6:38 pm
by Scott Schechtel

nevermind...I got that piece working. yeehah. Now I need to get it to pull a barcode from the db!


barcode scanner to invoke data from database

Posted: Thu Sep 26, 2013 7:01 pm
by Kateryna Grynko

Hi Scott,

Please save barcode in localStorage, and then add the service to read from database by the key: http://docs.appery.io/documentation/b...


barcode scanner to invoke data from database

Posted: Thu Sep 26, 2013 9:53 pm
by Scott Schechtel

please explain 'save barcode in localStorage.."


barcode scanner to invoke data from database

Posted: Thu Sep 26, 2013 10:41 pm
by maxkatz

The value that you get from the barcode scanner -- save it in browser's local storage. When you invoke a service, you can read the value from local storage and use it as input to a service. This will also help: http://docs.appery.io/documentation/u...


barcode scanner to invoke data from database

Posted: Thu Sep 26, 2013 11:17 pm
by Scott Schechtel

The value I want to get from the barcode scanner would be the actual sku on the barcode (13 digit upc). I have this listed as the _id in the database but still not clear on saving in browsers local storage - please explain.


barcode scanner to invoke data from database

Posted: Thu Sep 26, 2013 11:34 pm
by Scott Schechtel

So the value I get from the barcode scanner will be the 13 digit barcode which will be _id in the database. Still not sure what to save into browsers local storage. Please explain again...thx


barcode scanner to invoke data from database

Posted: Thu Sep 26, 2013 11:51 pm
by maxkatz

You would be saving the 13 digit value. Any value that you get from the bar code scanner you can save into local storage and then use it as input for another service or do anything else you need.


barcode scanner to invoke data from database

Posted: Fri Sep 27, 2013 12:25 am
by Scott Schechtel

What if there are a thousand products each with a barcode. Do I save each one in local db? Or is that the only way to make it happen?


barcode scanner to invoke data from database

Posted: Fri Sep 27, 2013 12:39 am
by maxkatz

You would create one local storage variable, for example: productId. Every scan would set it (and overwrite the previous entry).