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 / Resetting a label that...
Power Apps
Answered

Resetting a label that has a variable

(0) ShareShare
ReportReport
Posted on by 97

I have a scanning app that uses a 'scanvalue' as the variable to receive the barcode scan.

OnScan set to Set(scanValue,BarcodeScanner2_1.Value)

Label (hidden) has Text value of 'scanValue'.

TextInput control has Default set to '(lbl_ScanValue.Text)'.

 

I have a ResetVar set for all fields with a OnSelect of UpdateContext({ResetVar: true}); UpdateContext({ResetVar: false}).

All fields have Reset set to ResetVar.

 

Working on getting the scanValue to reset when I press the Reset icon.

Categories:
  • Verified answer
    zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    OnSelect of Reset:

    Set(scanValue,Blank())

     

    PS: You don't need hidden label. You can directly reference variable value inside textbox

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @CPGDallas 

    Set your label text to : BarcodeScanner2_1.Value

    You don't need to use a variable for this.

    I hope this is helpful for you.

  • CPGDallas Profile Picture
    97 on at

    I thought the hidden label might not be needed but after adding the BarcodeScanner2_1.Value to the text field the input remained.  (Next post)

    However, using the method in this post did the trick!

    Set(scanValue,Blank())

     

    Thank you!

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @CPGDallas 

    Are you resetting your barcode scanner control??  If you are, there is no need for the variables, or even the labels.

  • CPGDallas Profile Picture
    97 on at

    I am. That's interesting and I'll explore that option.  But there was something about getting the value converted to text to either display or patch to a SQL DB.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard