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 / Populate text in a lab...
Power Apps
Answered

Populate text in a label based on populated text in a text input field

(0) ShareShare
ReportReport
Posted on by 282

Hello, 

 

I am sure that this is possible and probably pretty easy for you guys, but looking for some assistance on this.  I have a form (below) that has one drop down (Step 1.) and then the second (Step 2.) is dependent upon the selection in Step 1.  Then the text input boxes below populate data from an excel file based on the selection in Step 2.  

 

What I am looking to do is - whenever the middle box shows "Profile Update for Program Change" - I want to have a label populate the text "Program" in the header of that text input (highlighted).  Whenever the box shows "Profile update for Concentration Change" - I want it to show "Concentration" instead.  

 

ianallen13_0-1643818216928.png

 

I have two labels built off to the side, to see if there is a way to just have another label display one or the other, based off of what populates in the middle text box?  Any ideas??  I was wondering if I could do a 'Ends with" formula, but not sure how to construct that...

 

@AJ_Z  - this is sort of the same thing that you helped me with.  Any thoughts?

 

Categories:
  • AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    There are many ways to do what you want from substituting . replacing the word in the text, using a variable, a condition or something else.

     

    I feel the simplest option is just a condition. I wrote this in my version of your app:

     

    If("Concentration" in Label1.Text,"Future Concentration with Decision on Application but prior to Start Term (prior to starting any classes)","Future Program with Decision on Application but prior to Start Term (prior to starting any classes)")

     

    I put it in the Text property of the middle label:

    AJ_Z_0-1643820236372.png

     

    please remember to change the red Label1 above to the name of your middle box.

  • Verified answer
    AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    This condition essentially means that if the word "Concentration" is in the box it will show the first option:

     

    "Future Concentration with Decision on Application but prior to Start Term (prior to starting any classes)"

     

    but if it is not it will show the second option:

     

    "Future Program with Decision on Application but prior to Start Term (prior to starting any classes)"

  • ianallen13 Profile Picture
    282 on at

    Yes - this worked, but now I have a similar, yet slightly different ask. 

     

    For my graduate certificates, I need it to sometimes say Certificate and then sometimes say program.  However, the actual text in the text input box will always says Program Change.  I've attached a screen shot to show what I mean.  I was thinking of adjusting what you did, but maybe have it linked to the Step 1. Select Program / Track since that would be the only thing really separating these two differences.  

    ianallen13_0-1643836689244.png

    What are your thoughts? 

  • ianallen13 Profile Picture
    282 on at

    So I think I may have figured it out and it's ridiculous of how easy the work around for this way.  But thank you for all your help!!  

  • AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    No worries at all Ian happy to help let me know if you have more questions 🙂

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
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard