May 22, 200421 yr I would like to perform record validation when the user commits a record. For example, if the value of a boolean field = True, I would like to ensure that another field in the same record is empty. How do I do this?
May 22, 200421 yr You could use this validation, James, attached to your second field: IsEmpty(SecondField) and Boolean > 0 or Boolean < 1 Unclick 'Validate Only if Field has been Modified' in the calculation box. Oh. I know there are prettier, more clever ways. I just can't think of them. LaRetta
May 22, 200421 yr Author No, you were absolutely correct. I'm new to FileMaker and I just didn't understand your approach. Thanks for your attached file. It quickly cleared everything up. Actually, I wanted to ensure that the second field is empty if the boolean field is equal to "Yes" and not empty if the boolean field is equal to "No". Following your example, here is the calculation that acheives this when used as validation for the second field: IsEmpty(secondfield) and boolean = "Yes" or not IsEmpty(secondfield) and boolean = "No" Thanks very much.
May 22, 200421 yr Hi James, I wondered what would be the criteria if the boolean was false - whether you would allow it to remain blank. And FM7 does not treat Yes/No, True/False, T/F, or Y/N as booleans like prior versions did. I thought you meant 'real' booleans. Regardless, I'm pleased you have it working for you now. LaRetta
May 22, 200421 yr This is where xor comes in handy, too. IsEmpty(secondfield) xor boolean = "No" XOR ensures only one statement can be true, but not both. So it implies the inverse.
Create an account or sign in to comment