Sorry in advance. I am a complete noob at this.
Basically I want to limit the number of words that can be used in a large multiline text field in a Dynamics Portal Webform. I know what you are thinking, but just I can't set a small character limit on the field in Dynamics, because I want to use this field for multiple forms with different character length restrictions, so need to throttle the word count on the portal side through validation (per form tab).
I've tried using this REGEX I scraped from a forum ^\W*(?:[\w\.\,]+(?:\W+|$)){1,10}$ but is isn't working. I cant get any REGEX to work in the portal for that matter. I don't know if this is just me or if it just doesn't work.
The other option is to use the Custom JAVA. I'm not a coder, and I cant be the only person on the planet who needs this. And I cant find a repository or forum that I can rob from.
The field is called tri_multilinetext1
It's a required field, and cannot contain more than 10 words.
If it does, prevent the tab proceeding, and display an error message to say. You're an idiot! The question asks for 10 words, you've inputted 11 (Obviously will need a calculation to display the 11, but surely that will be part of the validation anyway?)
Can anyone help please?
Hi @jamestredree,
You can add a validation rule to the form.
After clicking "Submit" user will get an error message.
See the link below for client-side validation
Add custom JavaScript - Power Apps | Microsoft Docs
For checking the number of words you can also use :
"
"
Hoping it helps.
Thanks for this. But how do I limit the text in the box to a specific number or characters or words?
Hi
Try using the following RegEx /\b\w+\b/g
Hoping it helps.
Lucas001
60
Super User 2025 Season 1
Fubar
55
Super User 2025 Season 1
surya narayanan
35