Solved

Validation by Calculation

Posted on 2006-06-14
6
275 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
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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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 100 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

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…
Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 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