12-14-2015 02:11 PM
Hi,
Is there a way to set the limit on the length of string control in number of bytes? I have a string control whose length is always going to be 3 bytes and I don't want the user to accidentally enter more bytes.
What I have done right now is have a value change event on the string and display only the 1st 3 bytes whenever the value change event occurs but I want to know if there is any direct way to set the limit on the number of bytes on the string control.
Thanks,
Ritesh
Solved! Go to Solution.
12-14-2015 02:51 PM
12-14-2015 02:51 PM
Did you set the "update while typing" property to True so that you can delete extra characters immediately after they are added instead of after people type for a while?
Apart from doing that I don't know of a way, though.
12-14-2015 02:55 PM
12-14-2015 03:02 PM
And go give this idea a kudo: Option to Limit the Number of Characters in a String Control
12-14-2015 03:06 PM
Another related idea would be to have a fixed lenght string datatype as described in this idea. 😄
12-14-2015 05:40 PM
12-15-2015 01:14 PM
Thanks everyone!
I am already using "String value change" event to capture the change and then displaying only the 1st 3 bytes, but altenbach's answer is more elegant that it doesn't allow keystrokes event if the number of bytes have already reached the limit, so I accepted that as a solution.
I was only hoping to find a direct property of a string control to limit the number of bytes. It seems like the rquest has been submitted mutiple times so I did my part and kudoed those requests.