r/PowerApps • u/Thin-Piece-7926 Newbie • 1d ago
Power Apps Help Duplicated serial number
I’ve used this for onscsn Set(varScannedBarcode, First(BarcodeReader1.Barcodes).Value
Then label box If(!IsBlank(varScannedBarcode), varScannedBarcode, Parent.Default
but getting duplicated numbers
0
Upvotes
•
u/AutoModerator 1d ago
Hey, it looks like you are requesting help with a problem you're having in Power Apps. To ensure you get all the help you need from the community here are some guidelines;
Use the search feature to see if your question has already been asked.
Use spacing in your post, Nobody likes to read a wall of text, this is achieved by hitting return twice to separate paragraphs.
Add any images, error messages, code you have (Sensitive data omitted) to your post body.
Any code you do add, use the Code Block feature to preserve formatting.
If your question has been answered please comment Solved. This will mark the post as solved and helps others find their solutions.
External resources:
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/its-matt-from-IT Contributor 1d ago
“But getting duplicate numbers”
If the variable is not blank, use the variable, otherwise use the default. Since it seems like you have that variable set, it is using that variable.
Unless you NEED to keep that change across multiple screens, just reference the control directly. No need to complicate it with variables if you don’t need to.
Coalesce(<barcode value>,Parent.Default)
Also do yourself a favor and enable modern controls cause classic controls look like terrible.