Skip to main content

Notifications

Community site session details

Community site session details

Session Id : AhBXAl/sVP+w96lpuUreJF
Power Apps - Building Power Apps
Answered

Assign a word limit to the text input field

Like (0) ShareShare
ReportReport
Posted on 28 Nov 2022 13:15:53 by

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:
  • KRider Profile Picture
    577 Super User 2024 Season 1 on 28 Nov 2022 at 14:28:26
    Re: Assign a word limit to the text input field

    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!

  • Community Power Platform Member Profile Picture
    on 28 Nov 2022 at 14:20:40
    Re: Assign a word limit to the text input field

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

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 28 Nov 2022 at 14:05:22
    Re: Assign a word limit to the text input field

    @thatakke

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

  • Verified answer
    KRider Profile Picture
    577 Super User 2024 Season 1 on 28 Nov 2022 at 14:05:14
    Re: Assign a word limit to the text input field

    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
    )
  • Community Power Platform Member Profile Picture
    on 28 Nov 2022 at 13:37:20
    Re: Assign a word limit to the text input field

    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,

  • KRider Profile Picture
    577 Super User 2024 Season 1 on 28 Nov 2022 at 13:26:50
    Re: Assign a word limit to the text input field

    Its in the advanced options:

    KRider_0-1669641998331.png

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
MS.Ragavendar Profile Picture

MS.Ragavendar 20

#2
BCBuizer Profile Picture

BCBuizer 10 Super User 2025 Season 1

#2
LC-26081402-0 Profile Picture

LC-26081402-0 10

Overall leaderboard
Loading started