Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Is there a way to limit the number of characters that appear in a label or text box?

(1) ShareShare
ReportReport
Posted on by 634

I have a label that is showing several lines of text. With a text box I can turn off multiline, which does limit the text shows, however it will only show 1 line of text. Is there a way to wrap that to more lines? Can this be done with a label instead?

 

I would the output to look like this? 3 maybe 4 lines of text followed by 3 periods.

 

Text text text text text text text text text

text text text text text text text text text

text text text text text text text text...

Categories:
  • GreenJaguar Profile Picture
    GreenJaguar 176 on at
    Re: Is there a way to limit the number of characters that appear in a label or text box?

    @Future_Vision @RandyHayes 

    Had the same issue and ended up solving it like this

     

    Left(ThisItem.Report,150) & "..."  the 150 characters is the max I wanted to display in the Body section of the gallery.

     

     

  • RandyHayes Profile Picture
    RandyHayes 76,287 on at
    Re: Is there a way to limit the number of characters that appear in a label or text box?

    @Future_Vision 

    Like I said...not sure if it helps.  I just wanted to make sure that you were aware of it in case it would have actually helped.

  • Future_Vision Profile Picture
    Future_Vision 634 on at
    Re: Is there a way to limit the number of characters that appear in a label or text box?

    @RandyHayes 
    I did try that but it doesn't work well with a gallery. My gallery is really for preview and not full records. That is what I use a display form for.

  • RandyHayes Profile Picture
    RandyHayes 76,287 on at
    Re: Is there a way to limit the number of characters that appear in a label or text box?

    @Future_Vision 

    Yes, unfortunately, that will not happen that way with the control.  

    Don't forget though, you also have the Overflow - Scroll option that you can use if you can do away with the 3 dots concept.  This will make the label scroll if there is an overflow.  Not sure if that helps in any way, but just wanted to make sure you were aware of it.

  • Future_Vision Profile Picture
    Future_Vision 634 on at
    Re: Is there a way to limit the number of characters that appear in a label or text box?

    @RandyHayes 
    Thanks Randy. It's not ideal since I'd like to wrap to fill the label and only add the dots at the end when the text doesn't fit but I guess this will do for now. FYI. I couldn't get multiple lines to end with 3 dots. All text seems to get compacted into a single line.

  • Verified answer
    RandyHayes Profile Picture
    RandyHayes 76,287 on at
    Re: Is there a way to limit the number of characters that appear in a label or text box?

    @Future_Vision 

    For the most part, you would turn off the Wrap option and you're only going to get overflow for each line of the text.  If you have multiple lines in the text, they will all end with three dots.  If a single line, it will be one line ending with three dots.  

    In other words, the label will not wrap and not wrap - it will not wrap to the height of the label and then not wrap from there.

     

     

  • Future_Vision Profile Picture
    Future_Vision 634 on at
    Re: Is there a way to limit the number of characters that appear in a label or text box?

    @RandyHayes 
    How would you achieve this. As of right now all of the text shows in the label. It only gets cut off my the height of the label.

  • RandyHayes Profile Picture
    RandyHayes 76,287 on at
    Re: Is there a way to limit the number of characters that appear in a label or text box?

    @Future_Vision 

    You will not get this with a TextInput control, but a label will do what you are asking for.

    I hope this is helpful for you.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard