Restrict Field Size

Hi,

I want to restrict users from Entering more than 3 digits in a numeric field. How ccan I do that?

any idea? Any help in this regard will be appriciated.

thanks

Shivaji

Subject: Restrict Field Size

That is a tricky one. By default, there is no option for that. You can however write some notestimer code that checks the content of the field based on an interval (10 times per second works nice), but may result in sudden error messages due to a bug/memleak somewhere. I think it is better to restrict the size of the field using the native OS style to only fit around three characters, and do some validation afterwards.

Subject: Restrict Field Size

Shivaj,

Here’s some code that I use on the QuerySave event just to warn that a field is too large and they should change it. You might be able to use something like this to help on validation or an event:

@If(

@Length(ProjectNum) > 80;

@Prompt([Ok]; “Project Title is long!”; “You have entered " + @Trim(@Text(@Length(ProjectNum))) + " characters in the Title field.” + @NewLine + @NewLine + “Please remember that this field is used for views and needs to be concise.”+ @NewLine + @NewLine + “This warning is given when the title exceeds 80 characters.”) ;

“”);

HTH

Teri