# Search in database with barcode

**URL:** https://community.glideapps.com/t/search-in-database-with-barcode/50256
**Category:** Ask for Help
**Created:** [September 27, 2022, 10:21am UTC](https://community.glideapps.com/t/search-in-database-with-barcode/50256 "2022-09-27T10:21:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![visje999](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/visje999/32/39297_2.png) [@visje999](https://community.glideapps.com/u/visje999)
#### Post date: [September 27, 2022, 10:21am UTC](https://community.glideapps.com/t/search-in-database-with-barcode/50256/1 "2022-09-27T10:21:33Z")

</div>

Dear,

we want to search a product in a database by scanning the barcode.  
It looks like, the barcode scanner can only add ean codes to the database.  
Is it possible to search the name in the database with that ean code?  
Or can you make a function for it that search for the ean code in the database and returns a name?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [September 28, 2022, 12:41am UTC](https://community.glideapps.com/t/search-in-database-with-barcode/50256/2 "2022-09-28T00:41:38Z")

</div>

What I would try to do is:

- Have a field so that the barcode scanner can “scan” into that field.

- Use a relation to relate the result to the table where you store all barcodes and names.

- If you want to display a list of matching results, make that relation multiple, and show them in an inline list.

- If you want to display a single name (in case all things are unique, I assume this is the case), create a lookup on top of the single relation and return the name.

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [September 29, 2022, 12:27pm UTC](https://community.glideapps.com/t/search-in-database-with-barcode/50256/3 "2022-09-29T12:27:04Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
