Jump to content
Sign in to follow this  
Rotorian

Calculation, Validation or Script

Recommended Posts

Hello,

New to this place, and fairly new to FMP, so pardon the question. This question seems simple enough, but I cant figure it out.

I have two fields, one named "Results" the other is named "Comments". If Results = F then Comments cannot be empty.

Right now i have setup to where if Results = F then the user is sent into "Comments" but I dont want them to get out of the record without actually entering comments. So:

If (Results = "F".........I dont know how to do the Then part.

Thank you for your time, interest and help.

Share this post


Link to post
Share on other sites

Validated by calculation:

If (resultsf <> "" ; not IsEmpty ( commentsf ); IsEmpty ( commentsf ) )

Share this post


Link to post
Share on other sites

Take a look at this thread "How to validate data entry in second field?", it appears to answer your question.

click here

HTH

Lee

cool.gif

Share this post


Link to post
Share on other sites

Thxs Mr. Smith,

Looks like Ray's suggestion is the ticket. One quick question, I am looking for specific data in field 1 and then force the user to enter data in field 2. Field one will always have an entry as it is setup as radial button choice of P or F (for pass/fail). Only when F is present(selected) do i then need an entry in field 2.

Share this post


Link to post
Share on other sites

Okay,

I came up with this in field 2 validation:

Results = "F" not IsEmpty(Comments)

However, now even when a comment is entered it still doesnt see the entry into the field and asks to enter comment. Suggestions?

Share this post


Link to post
Share on other sites

AGH!

Nevermind, no matter what value is entered in field1 (with my example), it still asks for a comment.

Share this post


Link to post
Share on other sites

Results <> "F" or not IsEmpty(Comments)

Share this post


Link to post
Share on other sites

That's shorter than mine; a Boolean instead of an If statement.

Share this post


Link to post
Share on other sites

That last sugestion didnt work either, so I took the easy way out. Field cannot be empty and requires a comment even if it is just "None".

Share this post


Link to post
Share on other sites

Well, it should work. If you zipped and attached your file, we could see what else is going on that may be preventing it from working correctly.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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