consultgal Posted August 9, 2006 Posted August 9, 2006 I have a calculation field defined as: If( not IsEmpty(x),If( IsValid(x), 1, 0),1) Field x is defined to be "strcict data type" numeric only. However, when field x = "15/yr" or "10-15" the calc field is resulting in 1. Shouldn't IsValid return false in that case? Thanks in advance! Courtney
Ender Posted August 9, 2006 Posted August 9, 2006 (edited) Hey Courtney, Unfortunately, IsValid() only returns false on a local number field if the field contains only text. Edited August 9, 2006 by Guest
consultgal Posted August 9, 2006 Author Posted August 9, 2006 So what is a good way to test for ANY non-numeric data in a numeric field?
Ender Posted August 10, 2006 Posted August 10, 2006 In FM5, I think you'll need to do it like this: Change the field x to a text field. Then add a calc like this: tempInvalid_x (calculation, number result) = case(texttonum(x) <> x, 1) Perform a find on tempInvalid_x = 1 Correct the offending values, then if you wish, change the field type of field x back to a number, with the validation.
Recommended Posts
This topic is 6742 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