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 / Unable to clear/reset ...
Power Apps
Answered

Unable to clear/reset label.Text through button click

(0) ShareShare
ReportReport
Posted on by 161

Hi,

I have a label's .Text property set to User().Email to display the user's email address when the screen is active. Next, I have a button that, among other things, should reset the label's .Text property to "". Unfortunately, I'm unable to accomplish this. I know how it works with text input fields (reset or updateContext) but can't figure out how to do this with labels.

 

I tried an if-statement like: If(button_1.pressed, "", User().Email) but that didn't work.

 

Thanks for the help.

Categories:
I have the same question (0)
  • Verified answer
    tchin-nin Profile Picture
    779 on at

    Hi,

     

    You could use a context variable to set the Label.Text property:

     

    • On the OnVisible property of your screen, set the variable : UpdateContext({LabelValue:User().Email})
    • On the Text property of your Label to the value of the context variable : LabelValue
    • On the OnSelect property of your button, update your context variable : UpdateContext({LabelValue:""})

    Cheers,

    Théo

  • colonel_claypoo Profile Picture
    161 on at

    Excellent. Thank you, that worked. I just had to reload the app otherwise the 'OnVisible' for Screen1 was not working and the User().Email property would not show in the label.

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