August 21, 200619 yr 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.
August 21, 200619 yr 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
August 22, 200619 yr Author 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)
August 22, 200619 yr Hi try this calculation as the validation calc for field3: field3 = field1 + field2 or, if you wish: field3 = Sum ( field1 ; field2 )
August 22, 200619 yr Or just: field1 + field2 = field3 and turn "Validate only if field has been modified" off.
August 22, 200619 yr "and turn "Validate only if field has been modified" off." yes, this is the MAIN thing
August 23, 200619 yr Author thanks. I didnt see that checkbox (validate only if field has been changed) that was the solution.
Create an account or sign in to comment