Barcode Scanner only displays barcode numbers

Hi I’m testing the Barcode Sample App.

When scanning a barcode it accurately records the UPC code but it doesn’t resolve to a product name.

UPC lookup confirms the scanned number correlates with the correct product.

What am I missing here…

Thanks

Hi @Izzy_Kleinhendler, welcome to the Community!!

Where are you looking up the UPC?

It seems you might be new to AppSheet so I’ll just quickly describe how Barcode scanning works.

First, line barcodes do simply convert to a number. So that is the result you normally will see.

For that code to resolve to some product, the product must be listed in the apps data table with the UPC number record in that table data row.

In AppSheet, when you scan the barcode, it gets converted to the number and then it attempts to filter the list of items in the view using that scanned number as the filter criteria. The app DOESN’T retrieve product info from any external online sources - in case that is what you thought.

If it IS the case that your sample app has the product listed in the data table AND that product row has the barcode number listed in it, then it may be that the column in your version of the app is not marked as “Searchable”

To make sure the column is Searchable, open the column in the Editor, scroll down to the “Other Properties” section, expand it and check “Searchable” if its not already checked.

2 Likes

Thanks for the response and clarification. I was hoping to be able to do something like this. Using google sheets to return barcode information? - Google Docs Editors Community
If Google sheets can pull barcode info, Maybe there’s a way to save barcodes to one column, and have a similar type function (see link) populate product names.

What you are suggesting is the best way to go about it and likely possible. But keep in mind it would be outside of the AppSheet platform.

You would need to create some external process (such as in Google Scripts or similar service) OR…use some already created process that retrieves that data and places it into one of your sheets. This would make it available to your AppSheet app.

I would imagine that there are services out there that gather and present the barcodes and related details and you may even be able to get that info for free from some sources. It’ll take some research.

1 Like

I just wanted to post what I ended up doing. Maybe it’ll help someone down the road. I’m not sure this is the most efficient way to do this, but it works.

I’m using a combo of Google Sheets Functions and Appsheet Automations.

My spreadsheet looks something like this:

Column D contains the following function: =REGEXREPLACE(IMPORTXML(“https://www.upcitemdb.com/upc/"&C2,"//title"),"^\d+ - +”,"")
Here I’m basically copying what I found here except I’m using https://www.upcitemdb.com which seems to be a much bigger database.

The problem with the results it that it contains extra text that I don’t want.
For example, UPC 038000070105 - Corn Flakes Kellogg’s Corn Flake Crumbs, 21 Ounce |
upcitemdb.com.
I only want the product name. So I ran another two functions to remove the first and last parts of the text.

Column E contains the following function:
=LEFT(D2,LEN(D2)-16)

Column F contains the following function:
=RIGHT(E2,LEN(E2)-19)

I’m now left with the results I need.

The rest is done with AppSheet.
The name of my Data sheet is Items.

First create an Event. in our case, when data is added to our table.

Next create two processes. The first one copies the barcode from Column B to C
The second copies the item name (after the lookup) from Column F to B


Finally, I tied it all together with a Bot. When the Event is triggered, run both Processes.

And it works whew!
To use, simply scan a barcode and hit save. The rest runs in the background and the result is an item name and barcode.

2 Likes