Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Validation by Calculation

Posted on 2006-06-14
6
Medium Priority
?
299 Views
Last Modified: 2010-04-27
FMP 8 again

How do I set a "not empty" validation on field3 if field1 = "x" and field2 = "y"
0
Comment
Question by:Cruizectrl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 19

Expert Comment

by:billmercer
ID: 16907880
The field validation boils down to a boolean value, so you need a validation expression that evaluates to
Short answer:
  if ( if field1 = "x" and field2 = "y"; not IsEmpty(field3); 1 )

Longer answer:
  If you really want to strictly enforce validation, you need to take into account the user possibly changing the fields in a different order, as the validation only runs when the field changes. So you might want to add validations to the other two fields as well, so that the user can't go back and change field1 to a "z" without getting an alert as well. Might be overkill, depending on your application.


0
 
LVL 28

Expert Comment

by:lesouef
ID: 16909406
For such a headache, I suggest to use a custom dialog box to enter all 3 values in the same window,, using global temp fields. Yr control script will check values, and then issue a msg telling what's wrong and offering to loop or escape, leaving data unchanged, or setting the corresponding field from the temp ones.
0
 
LVL 1

Author Comment

by:Cruizectrl
ID: 16911423
I dont want to use a dialog box because most of these fields are from selections.  I have a activation process that will check whats filled out.  I normally put the validations in there, but I thought there might be an easier way.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 28

Expert Comment

by:lesouef
ID: 16911747
true, this dialog box is missing check boxes and popups...
could you use a plug-in which executes a script whenever a given field is modified? (softs4humans event plug-in)
0
 
LVL 19

Accepted Solution

by:
billmercer earned 400 total points
ID: 16913613
Here's a simple solution:

Put a validation calculation just on Field3, but uncheck the option that says "Validate only when field has been modified."
That will force validation to run whenever the record is accessed, which means it will kick in even if the user goes back and alters the values of field1 or field2. That will prevent user entering the correct values in 1, 2, and 3, but then going back later and changing 1 or 2 without changing 3.

http://www.milleniumhandandshrimp.com/upload/notempty.fp7

0
 
LVL 1

Author Comment

by:Cruizectrl
ID: 16913807
Thats it exactly!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question