May 1, 200124 yr To all, I have a script that checks to make sure a 2 Letter abbreviation is entered into my Global field=Abbreviation. I can check to make sure the field isn't empty but Which function do I use to check it's not a number or the string contains a numerical value? i. A2, 34, B8B, ABC9 etc cheers in advance
May 2, 200124 yr Case(Position("0123456789",Left(Abbreviation,1),1,1),0, Position("0123456789",Middle(Abbreviation,2,1),1,1),0, Length(Abbreviation)>2,0, 1) This will return 0 (logical false) for invalid values, and 1 (logical true) for a good value.
May 2, 200124 yr Author Holy Cow!!, I wouldn't have thought of that, but it works a treat Thanks Bob really appreciate the help
May 11, 200124 yr BTW, a tip about validating global fields: you don't necessarily need to use a script to perform the validation. Try this: create a standard field of the type that the global field will eventually be (i.e., a number field if what you really want is a global number field). Set the validation for the field. Then change the field type from a normal field to a global field of the same type. The validation will stay with the field. Chuck
May 11, 200124 yr BTW, a tip about validating global fields: you don't necessarily need to use a script to perform the validation. Try this: create a standard field of the type that the global field will eventually be (i.e., a number field if what you really want is a global number field). Set the validation for the field. Then change the field type from a normal field to a global field of the same type. The validation will stay with the field. Chuck
Create an account or sign in to comment