Page 1 of 1

Barcode Scanner

Posted: Sun May 17, 2015 4:04 pm
by Cheryl

For barcode scanning, is it possible to return an image (which is a weblink) from the database for any matched product/ID codes. Is it possible to then use this image in the context of a different program written in appery?


Barcode Scanner

Posted: Mon May 18, 2015 4:32 pm
by Serhii Kulibaba

Hello Cheryl,

Sure, you can generate QR via JS. Use special library, e.g.: http://davidshimjs.github.io/qrcodejs/


Barcode Scanner

Posted: Mon May 18, 2015 11:54 pm
by Cheryl

Sorry, I'm not sure I follow. I have a database of Product Codes and Product Descriptions. I'm looking to cross-reference all the scanned Product Codes with the Product Codes in the database and give the user a description of the item (captured under Product Descriptions in my database). Is that possible, and if so how would I go about it?


Barcode Scanner

Posted: Thu May 28, 2015 2:33 am
by Yurii Orishchuk

Hi Cheryl,

Sorry for misunderstand.

So here is a common plan to implement it:

1 run barcode service on the page.

2 on "success" event - store received bar code to some storage.

3 invoke "list" service for collection where you store additional information about bar code.(image url, name, description etc..)

4 in "list" service "where" request parameter you need to use following JS code:

pre

//You need to use your storage instead of "barCodeStorage".
var barCode = Apperyio.storage.barCodeStorage.get();

//Wehre "barCodeId" is column name where you store bar codes.
var whereObject = {"barCodeId": barCode};

return JSON.stringify(whereObject);

/pre

Then you can use response in accordance to your needs. For example you can use "Success" mapping to display items(img, name, description etc..).

Regards.