Solved

Validation by Calculation

Posted on 2006-06-14
6
263 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
  • 2
  • 2
  • 2
6 Comments
 
LVL 19

Expert Comment

by:billmercer
Comment Utility
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
Comment Utility
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
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 28

Expert Comment

by:lesouef
Comment Utility
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 100 total points
Comment Utility
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
Comment Utility
Thats it exactly!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now