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 / How can I dynamically ...
Power Apps
Answered

How can I dynamically change a label text

(0) ShareShare
ReportReport
Posted on by 53
Hi,
 
  On my first screen, I have a edit button and on the "OnSelect", I have it first setting a global variable (gblMode) to "Update" and then navigating to the 2nd screen.
 
  On the 2nd screen, I have Label1 and on the "OnVisible", I have the following:
 
  If (gblMode = "Update", Label1.Text = "Update", "Add")
 
  However, the text on the Label is not changing, is my syntax correct ?
 
Thanks
Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    69,117 Most Valuable Professional on at
    Power Apps is a declarative system so you can't change the value of properties at runtime.  What you can do is set the property you want to change to a variable or a formula.  So for your situation add the following to the Text property of the label on the 2nd screen.
     
      If (gblMode = "Update", "Update", "Add")
     
    That will automatically change the label text if the gblMode variable is changed.  Another way to do it is just set the Text to gblMode and change the value of the variable to either Update or Add as needed.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 493 Most Valuable Professional

#2
11manish Profile Picture

11manish 479

#3
Haque Profile Picture

Haque 328

Last 30 days Overall leaderboard