Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I am going on 3 days without sleep and am bleary eyed and unable to figure this one out. I need to set a flag to "Y" when two dates are greater than a test date and where the foreign key is NULL. I am using the following formula but am not getting the desired result. Am I doing something wrong with the dates?

If((Invoice Max Date>2/8/2004 and ICL Commission Header ID<1 and ICL Signoff Date>2/8/2004), "Y", "N")

Posted

Coldspring:

What do you get if you drop one or more of the tests? Does each one work alone? Are any of them calculations? Sorry to give you more to think about when you're exhausted, but your calc looks okay from the outside.

-Stanley

Posted

I replaced your "Hard Coded" date of 2/8/2004 with a field "Any Date" in order to test different scenarios. I can't see anything wrong with your calculation, other than maybe it isn't unstored. Here is a case statement that seems to work.

Maybe we are not understanding what you are expecting.

Case(

Invoice Max Date>Any Date and

ICL Commission Header ID<1 and

ICL Signoff Date>Any Date, "Y", "N")

BTW, never, never, never go 3 days straight over a calculation. Much better on you health to just post your problem here.

cool.gif

Lee

FileMaker Version: 6

Platform: Mac OS 9

Posted

coldspring,

Date literals cannot appear directly in a calculation, use TextToDate() to make real dates:

If((Invoice Max Date>TextToDate("2/8/2004") and ICL Commission Header ID<1 and ICL Signoff Date>TextToDate("2/8/2004")), "Y", "N")

FileMaker Version: Dev 7

Platform: Mac OS X Panther

Posted

Yes,

I was surprised Stanley and Lee could have it working without the TextToDate()...

BTW, same is for your Max Date if it is Text.

FileMaker Version: 6

Platform: Mac OS 9

Posted

Hi Ugo,

I used a date field called "Any Date" instead of hard coding it and because it was returning what appeard to be the result that Coldspring was looking for, I didn't dig any deeper.

smile.gif

This topic is 7531 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.