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 / Assign a word limit to...
Power Apps
Answered

Assign a word limit to the text input field

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello community,

 

I need to implement a word limit to a text input field in the app that I've been building. I know I can set the MaxLength property for characters, but I need to specifically limit the text input to 250 words (which is approximately 1500 characters). I know this is not a built-in feature but, is there a way that I can achieve this? 

 

Thank you,

Categories:
I have the same question (0)
  • KRider Profile Picture
    577 Super User 2024 Season 1 on at

    Its in the advanced options:

    KRider_0-1669641998331.png

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks @KRider I thought MaxLength property was the character limit, not word limit. Can you verify? The related questions I find on the forum also make me think that it is a character limit.

     

    Thank you,

  • Verified answer
    KRider Profile Picture
    577 Super User 2024 Season 1 on at

    It absolutely is character limit. You could use a label to count the words and then not allow submit unless the word count is under 1500.

     

    CountRows(Filter(MatchAll(Textcontrol.Text, "\S*(\s|\n?)"), !IsBlank(FullMatch)))

     

    Then in the Display mode of your submit button:

    If(
     CountRows(Filter(MatchAll(TextInput2.Text, "\S*(\s|\n?)"), !IsBlank(FullMatch))) <= 1500,
     //submit code,
     //notify to shorten code
    )
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @thatakke

    There is no word limit in PowerApps. There is only a character limit. Nice solution @KRider

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks @KRider this is a very smart approach and exactly what I was looking for from this community.

  • KRider Profile Picture
    577 Super User 2024 Season 1 on at

    hahaha, no problem. I've learned from my super user friends. Very smart people! I owe @Drrickryp a pop or two for showing me Coalesce!

  • Suggested answer
    Rodimus07 Profile Picture
    5 on at
    See attachments for the formulas I've used, showing a text label under the data entry field:
     
     
    And to set the the Color property to turn red if you go past a maximum word count.
     
    Had to put multiple Substitutes replacing double-space with single, which is a bit rubbish.

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

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 414

#2
Valantis Profile Picture

Valantis 387

#3
timl Profile Picture

timl 344 Super User 2026 Season 1

Last 30 days Overall leaderboard