Page 5 of 8

barcode scanner to invoke data from database

Posted: Sat Sep 28, 2013 12:15 am
by maxkatz

Yes, but that logic has to be coded by you.


barcode scanner to invoke data from database

Posted: Sat Sep 28, 2013 12:19 am
by Scott Schechtel

I am just trying to avoid having to manually create a thousand screens and do it dynamically somehow...


barcode scanner to invoke data from database

Posted: Sat Sep 28, 2013 12:39 am
by maxkatz

It should be the same page (at least for the same products) where product id will be set dynamically after each new scan.


barcode scanner to invoke data from database

Posted: Sat Sep 28, 2013 1:01 am
by Scott Schechtel

Exactly! can you please point me to the tutorial that shows how to do that? or something similar at least


barcode scanner to invoke data from database

Posted: Sat Sep 28, 2013 1:17 am
by maxkatz

We don't have such tutorial (it's not possible to have a tutorial for each specific case). Once you complete some of the available tutorials and read the docs, you should have an idea how to add any features to your app.

These are the general steps:

-Scan
-Save the value from scan into local storage
-Invoke service to search for product information (based on value from scan)
-Display product information on page


barcode scanner to invoke data from database

Posted: Sun Sep 29, 2013 3:43 am
by Scott Schechtel6280324

So when I use the data mapping to get this: mapping save to local variable the scanned item does not show up. Instead I just get:

UPC_A
false

The product I scanned is in my database with the corresponding SKU which is now the local variable. I was hoping to see the other info, i.e. Name, price, description, etc.

whereas the original barcode service and mapping looked like this, I got

xxxxxxxxxxxxx
UPC_A
false

What did I miss????


barcode scanner to invoke data from database

Posted: Sun Sep 29, 2013 4:05 pm
by maxkatz

You need the text value (see screen shot above)


barcode scanner to invoke data from database

Posted: Sun Sep 29, 2013 10:16 pm
by Scott Schechtel6280324

Do I need to click the green JavaScript add button to provide the text value I.e. '13digitbarcode' ?


barcode scanner to invoke data from database

Posted: Sun Sep 29, 2013 10:31 pm
by maxkatz

'text' value is one of the response parameters returned by Barcode scanner. That's the scanned value.


barcode scanner to invoke data from database

Posted: Sun Sep 29, 2013 10:44 pm
by Scott Schechtel6280324

okay but I think the confusion is coming from Katya's responses above. It sounds like she is implying that I can have the scanner pull the value(sku) from the database that also contains the other info and just display on the next page dynamically. Also not sure where to add the db key:

EMPLOYEE
Katya Yakusheva (Employee) 3 days ago
Scott,

You should add Datasource for barcodescanner, and on its Complete event add "Navigate to page" action.

---------also----------
EMPLOYEE
Katya Yakusheva (Employee) 3 days ago
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...

More clarification please