Kevin Cheesman Posted March 18, 2010 Posted March 18, 2010 I have a field for number of pupils. How can I prevent a user from entering in something like 275-300? All I need is the whole number or I cannot search on that field. Thanks.
Kris M Posted March 18, 2010 Posted March 18, 2010 set the field data type to number and validation to strict numeric only, do not allow override, validate during data entry
Lee Smith Posted March 18, 2010 Posted March 18, 2010 (edited) Why not use the Filter Function? Go into Manage Database and [color:blue]Select the field you want to Filter. Click on [color:blue]Options Click on [color:blue]Calculated Value Copy or Enter this Calculation [color:blue]Filter ( Self ; "0123456789" ) Click [color:blue]Okay [color:red]Deselect "Do not replace existing value of field (if any)" Click [color:blue]Okay Click [color:blue]Okay Now, only 0123456789 will stick, anything else will not. Your example of 275-300 will become 275300 If you have an issue with already entered values, let us know and we can walk you through how to handle that too. HTH Lee Edited March 18, 2010 by Guest
Matt Klein Posted March 19, 2010 Posted March 19, 2010 If you are using FM10 or FM11 you could do it with a OnObjectKeystroke script trigger. To do this, you simply create a simple script that checks the key pressed by the user. If it's a key that you don't want entered into the field, you Exit Script[0]. I attached a real simplistic file that demonstrates this. PauseGSP.fp7.zip
Recommended Posts
This topic is 5433 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now