web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Barcode Scanner functi...
Power Apps
Answered

Barcode Scanner function to check if the scanned item is already exists

(1) ShareShare
ReportReport
Posted on by 10

Hi All,

 

I am new to the PowerApps so any help is highly appreciated.

I am currently struggling to write the correct code for my requirement.

I have a simple barcode scanner app.
I want to add a simple check function on the Scan button to display "Duplicate Item- Its already exists in the system" if the scanned item is already recorded.


Scan button is BarcodeScanner1
Barcode text input is DataCardValue4
Data source is IT Inventory

 

Please help !!!

DTamang_0-1662922378794.png

 

DTamang_1-1662922793625.png

 

 

 

screen1 image.PNG
Data source image.PNG
Categories:
I have the same question (0)
  • EricBLott Profile Picture
    248 on at

    You'll need to use a LookUp() function and IsBlank() to see if it exists. Lookup() checks the data source for a record and IsBlank() will tell you whether a record was returned. 

     

    IsBlank(Lookup(DataoSource,barcodeValue = DataSource.barcodeValue))

  • DTamang Profile Picture
    10 on at

    Thank you @EricBLott , much appreciated for your response.

    Still getting error. 

    Apologies in advance if I am making some silly errors.

    If(IsBlank(Lookup('IT Inventory',DataCardValue4 = DataCardValue4)),Notify("Item already exists");

    DTamang_0-1663001085464.png

     

  • Verified answer
    EricBLott Profile Picture
    248 on at

    In your LookUp() function, you need to reference the value of the control, so for example DataCardValue4.Text. You also need to compare this value to your data source column, like 'IT Inventory'.yourBarcodeColumn.

    So you'll use something along these lines..

    DataCardValue4.Text = 'IT Inventory'.yourBarcodeColumn

  • DTamang Profile Picture
    10 on at

    Thank you @EricBLott 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard