web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Bound Text Label & Aut...
Power Apps
Suggested Answer

Bound Text Label & Auto Wrap Text

(0) ShareShare
ReportReport
Posted on by 351
Hi Community,
 
1) I have a box with a drop-down list that returns different texts. How can I make a text input box display a value depending on the text selected in the drop-down list box?.
 
2) The box with the drop-down list has texts of different lengths. Can it be made so that depending on the size of the text, it changes size and automatically adjusts so that it appears completely in the box?.
 
 
Thanks¡¡
 
Francisco
Categories:
I have the same question (0)
  • Suggested answer
    Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    Yes you can do these things.

    Just set the default value of the text field to the selected value of the dropdown or combobox.
     


    If you want to perform calculations on the fontsize, you can use the Len() function perhaps--but it might not be worth the trouble.  It might make more sense to just format your text input control as multiline and make it big enough to accommodate your longest string selection.



    Here I set the height of the text input to be based on formula around the length of the text value in the same control. 
     
    Min(Max(Len(Self.Value),30),100)

    If the length of the text is under 30, it goes with 30.  If the length of the text is over 100, it goes with 100.
     
    Under 30

     
    Over 30



    Over 100

    If this helped you, please click "Does this answer your question" and give it a like to help others in the community (+ close the ticket)!

    Power Platform Developer | LinkedIn: Mark Nanneman | Blog: Power Stuff  | YouTube: Mark's Power Stuff  | 



     
  • Suggested answer
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 2 on at
     
    try the following:
    Use the Switch function (or equivalent) to dynamically change the text input box value based on the drop-down selection.
    Switch(
        DropDown1.Selected.Value,
        "Option1", "Text for Option 1",
        "Option2", "Text for Option 2",
        "Option3", "Text for Option 3",
        "Default Text"
    )
     
    Auto-resize the drop-down list box using the TextWidth function in Power Apps or CSS/JavaScript in a web app for dynamic text length adjustment.
    TextWidth(DropDown1.SelectedText.Value, TextSize) + 20
     
    let me know if you still have issues.
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard