Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Search field clears when new data is presented via barcode scanner

**** UPDATE ****

A similar idea from July 2017 has recently been updated to under review - you can CLICK HERE to find out more. 


Hello everyone. First app, first code writing.


We have a Honeywell CT50 Android device, which has a built-in barcode scanner, as well as the normal camera. We want to use the barcode scanner to read a barcode and display the results from a SQL Database.


Everything works until I want to scan the next item. When I press the scanner button on the handheld, the barcode is read and entered into the Search field, but the previous barcode which was scanned still exists and is preceded by the new barcode.


Does anyone know how I can get the search field to remove the existing data before the newly scanned data is entered? I should also add that we want this to happen without the end user having to click or press anything. They should be able to simply press the scan button for each item they want to scan, and the screen will display that item, without them having to click on the screen or have any further input requirements.


Thanks in advance for your help with this newbie to Powerapps and programming.



Community Support Team
Community Support Team

Re: Search field clears when new data is presented via barcode scanner



Please share more detailed configuration of your app. Especially the related formulas of each controls.




Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level: Powered On

Re: Search field clears when new data is presented via barcode scanner

Hi Mona. I will try to explain as best I can.


I have a SQL database [dbo.Order]which is on-premise and accessible via a gateway. There is currently a single table with the following fields:-

OrderID - a unique numeric number

LocatorCode - The item locations Code128 barcode

Barcode - the items Code128 barcode

Title - Title of the book/cd/dvd

Author/Artist - self-explanatory

ImageURL - each items image URL

BadPerson - to identify if the order should be given to customer services, indicated by a '1' or '0'.


I have a BrowseScreen which has been modified to display all the fields for a single entry (there will only ever be one result).

The Items section has the following entry:-


SortByColumns(Search('[dbo].[Order]', TextSearchBox1.Text, "Barcode" , "LocatorCode"), "Title", If(SortDescending1, Descending, Ascending))


We are searching from two fields as there may not be an entry in either the "Barcode" or "LocatorCode" so we cover both in the search.


I am using a Honeywell CT50 handset which not only has a camera but a built in 2d imager, which is what we are using to scan the barcodes.


When we scan the barcode it is entered into the TextSearchBox1 and the item successfully appears. However when the operator goes to scan the next item, the next scanned barcode prefixes the existing code in the TextSearchBox.


What I need is for the current barcode to be replaced with the new scanned barcode, which will then display the next item scanned. Since posting the original question, we now also need to record the operator name, and the date and time that the item is selected by them. This will need some form of button on screen that the operator will press to confirm the item displayed is the one they have physically picked and is in their hand.


I have added a new table to the database which will hold a list of users names, and this will be selected on an opening DisplayScreen, perhaps using a dropdown list? That data will then need to be written back to the item selected in the SQL db.


Is any of this possible, and do you know how I may achieve this? IS there any other information you may need?





Level: Powered On

Re: Search field clears when new data is presented via barcode scanner

I got a similiar issiue. 

I would like to create a button "copy" that will copy scanned barcode info to EDIT PASTE function on device or Windows.  

So I can paste barcodeinfo into somwhere else? 

Acanner works and scanned barecode shows up in "textinput"  field but I want a button "copy",  I can not find a way that works?   

Helpful resources


Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Power Platform World Tour

Coming to a city near you


PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Join PowerApps User Group!!

Connect, share, and learn with your peers year-round


Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 130 members 4,722 guests
Please welcome our newest community members: