How to play a Feedback Sound when a barcode is found inside a CSV file

Last updated: Apr 2nd 2021

If you want to check whether a specific barcode is present inside a CSV file by receiving a sound alert after scanning it with your smartphone, this is the guide for you.

 

How it works?

  1. The app acquires the barcode and sends it to the server
  2. The server will search for the barcode value inside the specified CSV file
  3. The server will reply to the app with the search result
  4. The app will evaluate the result and emit a specific sound

 

The Output Template

It looks like this:

output template

➡️ It contains a BARCODE component to instruct the app to acquire a barcode, and a CSV_LOOKUP component used to search the barcode value inside a CSV file.

➡️ Once a barcode is found, it’ll do two things: (1) Output the search result value to the Keyboard emulation (and/or) CSV output if enabled, (2) Write the result search value to the csv_lookup variable.

➡️ After that there are two IF sections, the first one tests the csv_lookup == "not_found" condition and the second csv_lookup != "not_found".

The BEEP and ALERT components are used to create a sound and a pop-up message.

 
 
 

🧐 Did you get lost?

Don’t worry, you don’t have to understand how it works. Just follow the instructions below.

Instructions

 
Step 1 – Download the Output template

Download the template file –> CSV Alert.btpt
Then double-click on it. (The server will automatically import it to the settings page)

 
Step 2 – Edit the CSV_LOOKUP component

1. Open the server settings by clicking the gear icon
2. Select the imported template “CSV Alert”, and click on the CSV_LOOKUP component:
3. Select the CSV Input file path that you want to use as database

Like this:

☝️ Suggestion: use a simple path such as C:\data.csv to avoid typos. Once you get it to work change it to whatever path you want.

 
The file you provide can contain multiple columns, for example:

12345,Box
12346,Packet
12347,Envelope
12348,Bag

The lookup will be performed on the first column by default.

 
Step 3 – Scan from the smartphone

Open the app, tap the scan button (camera icon) and select the correct Output template:

output template selection

 
Once you scan a barcode you’ll get an alert message with a sound alert.

In this example, the barcode 12345 is found and generates a Success message, and the 12340 barcode generates an Error message.

csv lookup
csv lookup not found

 
 

Step 4 – (Optional) Disable Keyboard Emulation

If you’re using Barcode to PC only to perform the barcode search, and you don’t want the output to interfere with other programs, you may want to disable the Enable Keyboard Emulation option from the server settings:

disable_keyboardemulation

Step 5 – (Optional) change the beep sound

If you don’t like the sound, you can change it by clicking the green BEEP component on the server settings:

file path

Comments

No comments found. Be the first to leave a comment.

Your email address will not be published. Required fields are marked *

Related posts