Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Ok its been along time since I have been on this forum.

I have three fields: InFile (Yes/No), Who (Pull Down Menu 4 Items) & Date Field (Date Format)

I can not figure out how to do a data validation on theses three fields...

I would love something like this:

When Infile="NO" & Who=Empty & Date=Empty then no error is given

When Infile="Yes & Who=Filled & Date=Filled then no error is given

When Infile="NO" & Who=Filled & Date=Empty then Error

When Infile="NO" & Who=Filled & Date=Filled then Error

I think i should use the case function but I do not how to do 3 fields

What about the if function?

Should I do this in the validation field or just a calculation field?

Help

Joseph

Posted

Create a calculation as follows:

Case (Infile="NO" and isEmpty(Who)=1 ; Error)

You don't need to reference "Date", as there is an error if date is empty or filled.

Cheers - Peter

Posted

Wow, that was quick thank you...

What if I wanted the Error to appear in a seperate field so i could format the way i would like....

Would i just have to put this case function in the field or is there someting else i would have to do?

Thank you for your quick response

Joseph

Posted

I'm unsure whether you've given us all of the possible conditions that you want to watch for. For instance, what if InFile = "No" and Who = empty and Date = filled? Or what about when InFile = "Yes" and Who = empty and Date = empty?

First, define what is required. Don't worry for the moment about when the error will come up, just when it won't. For instance, I think that the following is true:

When InFile is "Yes", Who and Date must be filled in.

When InFile is "No", Who must be empty.

I think this covers all four of your rules. In addition, it says that the first case I mentioned above (InFile = "No", Who = empty, Date = filled) is OK, while the second one will produce an error.

OK, so for the validation to occur, the following calculation must be TRUE:

( ( InFile = "Yes" ) and ( not IsEmpty( Who ) ) and ( not IsEmpty( Date ) ) )

  or

( ( InFile = "No" ) and IsEmpty( Who ) )

Now, for each of your three fields, enter that calculation into the Validated by Calculation dialog box that you see when you go to the field options in Define Fields and click on the Validation tab and then the Specify button next to that checkbox. When any of the fields change (and the record is committed), the calculation will evaluate, and if it returns TRUE, then the user won't see anything. If it returns FALSE, the user will see a dialog box. You can also allow the user to override the validation when it fails, and/or show a custom message.

Chuck

This topic is 7333 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.