Page 2 of 6

post barcode scanning procedure

Posted: Tue Oct 01, 2013 6:03 am
by Kateryna Grynko

Hi Scott,

1) Remove SetLocalStorage on Complete event please
2) Where do you invoke BarcodeService?


post barcode scanning procedure

Posted: Tue Oct 01, 2013 4:23 pm
by Scott Schechtel6280324

Okay I deleted the Set Local Storage on the Result page, invoked scanner service to restservice1 as that makes sense if that is where the database is, scanned a product in the db and still just got the three default text responses. Here's the screenshot of the results page mapping


post barcode scanning procedure

Posted: Tue Oct 01, 2013 7:35 pm
by Maryna Brodina

Hello!
1) On page mainpage on mobilebarcode1 service success event set Navigate to page - results
2) On results page Show event call the service to retrieve data from DB (it's better to use allwines_allwinesnew3_query_service service)
3) On Data tab of result page in service you use to retrieve data from DB in mapping on Request tab map localStorage variable sku to where parameter. If we understand correctly in DB there is sku field or something like that. In this case in mapping from localStorage variable sku to where parameter add the following JS:
prereturn '{"sku": "' + value + '"}';/pre
where sku is the fileld in DB (please note it's case sensitive)


post barcode scanning procedure

Posted: Tue Oct 01, 2013 8:21 pm
by Scott Schechtel6280324

Marina, Thank you so much for the last reply. Mainpage is now set to navigate to page and service is set to retrieve _query_service but I am still lost on your step 3. However after adding the line of code above for step 3, I got a different result after scanning a product in the db. It shows the labels for sku, Name, description, img and Country as per the design view of Results page just not the data from the db:

results page - request
results page -response


post barcode scanning procedure

Posted: Wed Oct 02, 2013 12:01 am
by Scott Schechtel6280324

Hi Marina,

I was hoping to get feedback on the last response. Again I am getting the updated screen but no data from the db. Everything looks good on my end or does it? Please let me know if you need another screenshot


post barcode scanning procedure

Posted: Wed Oct 02, 2013 12:14 am
by Alena Prykhodko

Hi Scott!

Please make sure you mapped localStorage variable sku to where parameter on Request tab.


post barcode scanning procedure

Posted: Wed Oct 02, 2013 1:16 am
by Scott Schechtel6280324

okay I did that but still getting the labels without the label results. here is my screenshot of Results page request


post barcode scanning procedure

Posted: Wed Oct 02, 2013 3:00 am
by Alena Prykhodko

Please check if you have any errors http://docs.appery.io/documentation/d...


post barcode scanning procedure

Posted: Wed Oct 02, 2013 3:15 am
by Scott Schechtel6280324

I clicked the link and there is a section on local storage but I am not able to find that. It also says it is just a HTML 5 app but it can still be native once deployed to Google/ apple stores? Is that also why the scan data is not displaying?


post barcode scanning procedure

Posted: Wed Oct 02, 2013 3:34 am
by Alena Prykhodko

Do you call this service after barcode scanner service call is ended up?

[quote:]I clicked the link and there is a section on local storage but I am not able to find that.[/quote] What section do you mean?

This app has to be tested as a hybrid app or installed on the device. Testing will not work in the browser.