Solved

Validation by Calculation

Posted on 2006-06-14
6
287 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
FIlemaker Go - Drop Down List Window Control 1 591
Filemaker record reorder popup 2 412
FM - Sorting Titles 5 75
FM - How to Sort both Ways in a Portal? 13 75
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

738 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