Check barcode value against a CSV file.

I am trying to create an app where the user scans a barcode and then checks whether the barcode exists in a CSV file. If the barcode ID exists, then the "Next" button will appear and the user can proceed to the next page of the app. Is this possible?

I've added a data connection rule for CSV import of that file. 

I've currently started the 30 day trial so would like to get as much out of it as possible.

Thanks!

Note: I am currently using a Galaxy s10 as the device for scanning.

4 years ago
SOTI Snap
ANSWERS
DK
Deepak Kumar
4 years ago

Hi Tin, 

We do not have an out-of-the-box solution for this scenario but if your CSV is not changing very frequently then I think you can embed CSV values inside your app (using a script) and compare the scanned value with that embedded list.

The downside of this approach is: If you need to change your CSV values you need to re-publish your app (which is quite easier though in SNAP).

S
SMod@Soti
4 years ago

Hi Tin,

Assuming the CSV file exists locally on the device where the app will be, there is a way to pull the contents of local files into a Snap app which can then be used to compare against the scanned barcode. It requires a bit of customization but can be achieved.

I have left you a private message to discuss this further in detail.

Thanks,

PH

Can you give me an example to do this?