Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

calculation validation


This topic is 6668 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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

Posted

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)

Posted

Hi

try this calculation as the validation calc for field3:

field3 = field1 + field2

or, if you wish:

field3 = Sum ( field1 ; field2 )

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.