cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ianallen13
Helper V
Helper V

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

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?

 

1 ACCEPTED SOLUTION

Accepted Solutions

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)"



Signature:


If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
Link to the Power Platform Professionals United Kingdom User Group:

https://powerusers.microsoft.com/t5/Power-Platform-Professionals/gh-p/PowerPlatformProfessionalsUnit...

View solution in original post

5 REPLIES 5
AJ_Z
Super User
Super User

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.



Signature:


If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
Link to the Power Platform Professionals United Kingdom User Group:

https://powerusers.microsoft.com/t5/Power-Platform-Professionals/gh-p/PowerPlatformProfessionalsUnit...

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)"



Signature:


If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
Link to the Power Platform Professionals United Kingdom User Group:

https://powerusers.microsoft.com/t5/Power-Platform-Professionals/gh-p/PowerPlatformProfessionalsUnit...

ianallen13
Helper V
Helper V

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
Helper V
Helper V

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!!  

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



Signature:


If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
Link to the Power Platform Professionals United Kingdom User Group:

https://powerusers.microsoft.com/t5/Power-Platform-Professionals/gh-p/PowerPlatformProfessionalsUnit...

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,583)