Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6420 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I would like to control data entry of dates. For example a specific date field cannot be < or > another date field or cannot be < or > the current date. I went to the define database, selected my field, then selected options, validation, specify calculation and typed the following:

< table::field and

but this did not work.

What's wrong?

Posted

I would try

If ( Your_Field_Name_Here > Get(CurrentDate) ; "" ; Your_Field_Name_Here)

If you want to set up a second date just add AND in the test part of the statement and repeat with other filed name.

Also check if the "do not replace value" is not checked.

Posted

so what will happen if one tries to enter a future date, will they be stopped or??

In access you could simply:

in a validation field for the properties of a specific field and the database would not allow the entry of the current date or any future date.

Also how do i write a calculation that will not allow a date entered that is < or > the date of another field in the database.

Posted

You cannot use another application's syntax and hope Filemaker will somehow understand what you want. First, there's no "today" in Filemaker - you need to use Get(CurrentDate). Next, you need to specify the full test (which may include the validated field itself, or it may not), e.g.:

MyFieldName < Get(CurrentDate) and MyFieldName < AnotherFieldName

Posted

Here is your calculation:

If (Date > Date1 and Date < Date2 ; Date ; "")

The field can be entered into however once the record is committed or the field is tabbed out of the date inside of it will disappear if it is not within the range of dates specified in the calculation.

Posted

Yes, I understood it as:

The field can have dates entered into it that fall within certain criteria, furthermore he would like to prevent typing in of any date if it is not within criteria, so I did a calculation that will validate if the date entered is within that criteria and if it is not then it will delete it thus creating an illusion that the date outside of criteria is not enterable at all but I might be wrong.

Posted

What Comment said - you will have to use FM syntax.

Posted

creating an illusion that the date outside of criteria is not enterable

Let's pretend I am the user and you the developer. I enter a date and it disappears before my eyes. I try again - same thing. I restart the solution, restart the computer, try it on another workstation, reinstall everything I can think of - finally... do you really want to be on the other side of that phone call?

Posted

You are 100% correct. I was merely trying to point in the right direction on how to set up a calculation as to how I understood the question - I was not offering a solution - I probably poorly expressed myself as I often do. :

This topic is 6420 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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