cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gilby1986
Frequent Visitor

Word Count Minimum for Textbox

I'm attempting to create a power app request form, where a justification is required. The justification must have at least a minimum of 25 words and no more than 500 words. In the event the user does not enter 25 words, an error message shows stating "Justification does not meet minimum word requirement".

 

Does anyone have a resolution as to how this can be done.

 

 

Thank You

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Gilby1986 

Yes, that will never work!  You are trying to split the text by "Justification does not meet minimum word requirement"...pretty sure your words are not separated by that phrase but by spaces.

 

The formula should be:

CountRows(Split(JustificationTextInput.Text, " ")) < 25

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

4 REPLIES 4
RandyHayes
Super User
Super User

@Gilby1986 

Set the Visible property of your "Justification does not meet minimum word requirement" label to:

CountRows(Split(yourTextInputControl.Text, " ")) < 25

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi Randy,

 

Thank you for your prompt response. I attempted to follow your instructions provided. Unfortunately the solution provided did not work. Maybe I'm doing something wrong. I've attached a screenshot of what I've entered.

 

JustificationError is the label created to display the error message

 

 

RandyHayes
Super User
Super User

@Gilby1986 

Yes, that will never work!  You are trying to split the text by "Justification does not meet minimum word requirement"...pretty sure your words are not separated by that phrase but by spaces.

 

The formula should be:

CountRows(Split(JustificationTextInput.Text, " ")) < 25

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes  Thank you sir for your assistance on today. With the solution provided I was able to resolve the error

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (5,234)