You're on the right track, that's the first boolean expression you'll need.
Case(IsEmpty(field1) and IsEmpty(field2);"";
IsEmpty ( field1 ) ; field2 ;
IsEmpty ( field2 ) ; field 1 ;
"error message here"
This assumes you want the error message to be returned by the calculation. If you wan't to pop it up in a dialog box, other means are required.
Can you have it pop up in a dialog box on a calculation? I know you can on a script. How do you make it occure on calculations.
By the way thanks
Take out the "error message here" clause from the calculation.
Define a separate validation rule that displays a custom validation message when both fields contain a value. You can set this rule on either one of the two fields, (no need for both), to get the error pop up.
IsEmpty ( field1 ) or IsEmpty ( field2 )
I made a script I was going to set for validation but doesn't seem to work. I think I did something wrong
Set error capture [on]
if [IsEmpty(Field1) or IsEmpty(Field2)]
show custom dialog
That's not what I meant. You didn't want a script, so I described a method that does not use a script.
Open Manage | Database | Fields and double click the field definition for either field1 or field2.
Select the calculation option and enter:
IsEmpty(Field1) or IsEmpty(Field2) //(This expression is True if either field is empty)
Enter whatever error message you want in the Custom Validation message box at the bottom of this dialog.
If you want to script it, you have to reverse the logic to identify invalid values here:
Not ( IsEmpty(Field1) or IsEmpty(Field2 )