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 Scan Overwrite...
Power Apps
Answered

Barcode Scan Overwrites existing Value always?

(0) ShareShare
ReportReport
Posted on by 5

Hi,

 

I have an edit form linked to a set of excel tables.

Upon a new entry I want to set one value of a row via a barcode scan. For this I added a barcode scanner doing the following:

OnScan = Set(scanValue, Barcodescanner2.Value)

And the DataCardValue has:

Default = scanValue

 

For new entries this work.

However if I want to edit this entry it either displays an empty field or uses the "scanValue" from a previous scan.

 

The goal is to display the value in the excel sheet, however it should be possible to change it with a new scan.

 

Is this possible and if so how?

 

Kind regards

Lennsart

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    Hi @Lennsart ,

    Make the Default of the control (replace with your field name)

    If(
     !IsBlank(scanValue),
     scanValue,
     ThisItem.YourScanCodeFieldName
    )

    then (importantly) at Screen OnVisible put

    Set(scanValue,Blank())

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • EE-19081314-0 Profile Picture
    2 on at

    Hi,
    I have an app created from a list in SharePoint.
    You can add an item to either the list or by the app. When you add it by app, you can scan a barcode.
    My problem is that if you go in and edit an item in the app, for example, the name, the IMEI number gets erased.
    How do I keep the information that is already in that field?
    I'm probably too new to this to follow it correctly because i just get an error .

    Floruimus_0-1718796467079.png

    Hope someone can help me as well! 😅

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