For years, people have been complaining that there’s no practical way to keep dynamic control of the number of characters the user has entered. Basic problem is that validation, onBlur and onChange events are only triggered when the user exits to another field.
With some help from old posts, I have a compromise solution that does exactly what I want - pops up a warning when the user reaches the limit.
Example:
To check field Sample for maximum allowed 30 characters:
Create an editable field, name = Sample, type = Dialog List, no multiple values, no field delimiters, allow values not in list, use formula for choices, refresh fields on change
formula = @If(@Length(Sample) > 30; @Prompt([Ok]; “Input error”;“Sample exceeds limit”);Sample)
It could be improved further is anyone has a suggestion. Ideally, you want to get rid of the excess character, but putting @Left(Sample,30) doesn’t work (why???). The only solution I have is to put a standard onChange event that truncates field content back to 30 characters. It only fires when user moves to another field, but it’s better than nothing