yaron Posted August 21, 2006 Posted August 21, 2006 I have a strange behavior. I have 3 fields which the 3rd ond should be validated to be sum on the 2 others. so I declared calculation validation on the 3rd one. but when I put bad number on the sum field - and add record - I get message (this is ok) when I put bad number in any of the other fields and add the record - I dont get error message and ther record goes in the database. did I do something wrong or it is a known FM bug??? thanks alot.
aldipalo Posted August 21, 2006 Posted August 21, 2006 It would probably be easier if we could see the fields and calculation/validation. If I understand you there are 3 fields. Field1>enter data Field2>enter data Field3>Sum field with validation calc. This is the only validated field? If so, field3 is the only field that will generate an error message because it is the only field that is validated. You can put a validation on any field, except a calculation field or a summary field, and probably need to do so. Also, is sum field a field that calculates the sum of the 2 other fields. If so, that field should be a calculated field. You could try something along these lines as well: Let ( $Sum = Sum1 + Sum2; Case( $Sum>20;"Greater Than 20"; Sum1>10 and Sum2>10 ;"Sum1 and Sum2 are each Greater Than 10"; Sum1>10;"Sum1 is Greater Than 10"; Sum2>10;"Sum 2 is Greater Than 10"; $Sum) ) If both numbers are greater than 10 you get "Greater than 20" as your error message. Naturally, you can make the message say whatever you want. HTH
yaron Posted August 22, 2006 Author Posted August 22, 2006 sorry for not explaining good enough. field 3 -> enter data + validation with calculation (to check if it is the sum of the other 2). I want the behavior to be like this: I enter 20 in the 3rd (sum) field I enter 10 in the 1st field I enter 9 in the 2nd field I try to commit the record - I want an error message in that stage! (the current behavior is that only if I entered the 3rd field last - its validation check works)
Raybaudi Posted August 22, 2006 Posted August 22, 2006 Hi try this calculation as the validation calc for field3: field3 = field1 + field2 or, if you wish: field3 = Sum ( field1 ; field2 )
comment Posted August 22, 2006 Posted August 22, 2006 Or just: field1 + field2 = field3 and turn "Validate only if field has been modified" off.
Raybaudi Posted August 22, 2006 Posted August 22, 2006 "and turn "Validate only if field has been modified" off." yes, this is the MAIN thing
yaron Posted August 23, 2006 Author Posted August 23, 2006 thanks. I didnt see that checkbox (validate only if field has been changed) that was the solution.
Recommended Posts
This topic is 6668 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