Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

post barcode scanning procedure

Hi Scott,

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

Scott Schechtel6280324
Posts: 0
Joined: Sun Sep 29, 2013 12:03 am

post barcode scanning procedure

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

post barcode scanning procedure

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)

Scott Schechtel6280324
Posts: 0
Joined: Sun Sep 29, 2013 12:03 am

post barcode scanning procedure

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

Scott Schechtel6280324
Posts: 0
Joined: Sun Sep 29, 2013 12:03 am

post barcode scanning procedure

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

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

post barcode scanning procedure

Hi Scott!

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

Scott Schechtel6280324
Posts: 0
Joined: Sun Sep 29, 2013 12:03 am

post barcode scanning procedure

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

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

post barcode scanning procedure

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

Scott Schechtel6280324
Posts: 0
Joined: Sun Sep 29, 2013 12:03 am

post barcode scanning procedure

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?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

post barcode scanning procedure

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.

Return to “Issues”