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 / Trying to set label Te...
Power Apps
Answered

Trying to set label Text property from OnSelect handler of other control but not working - why?

(0) ShareShare
ReportReport
Posted on by 19

Doing by first tests with PowerApps I'm trying to set a simple property on a label from the OnSelect event handler of another control but the property is not being updated. I placed the following code for the OnSelect handler and I'm using Notify to see that the handler is called and to see what value is the property currently set to

Label1.Text = "abc";Notify(Label1.Text)

 

What am I doing wrong?

How would you debug something like this?

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @NewDev 

    In PowerApps you cannot directly change the value inside a Text Input like this.

     

    Label1.Text = "abc"

     

    Instead, you must set a variable using your button.

     

    Set(myVariableName, "abc");
    Notify(Label1.Text);

     

    Then put this code in the Default property of the TextInput

     

    myVariable

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @NewDev ,

    Do you want to change the display value of a Label within another control?

     

    Based on the formula you provided, I think there is something wrong with it. Changing a attribute value of a control within another control directly is not supported in PowerApps currently.

     

    As fixed solution, please consider save the value ("abc") into a temporary variable, and then bind this temporary variable to the Text property of the Label.

     

    Please set the OnSelect property of the button to following:

    Set(TempVar, "abc");
    Notify(Label1.Text)

    Set the Text property of the Label1 to following:

    TempVar

     

    Please take a try with above solution, then check if the issue is solved.

     

    Best regards,

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 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard