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 7421 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm trying to create a simple If statement for a membership database. I want to use a simple calculation like this: If ( ExpirationDate < TODAY ; "expired" ; "active") but I can't figure out how to substitute the current date for TODAY. What's the simplest solution?

(I've been using FMPro for years (since version 3) but I've never really done anything with date calculations.)

TIA

Posted

Hi gadfly, welcome to FM Forums smile.gif

Your calculation should be text, unstored:

If(ExpirationDate < Get(CurrentDate); "Expired"; "Active")

Can the ExpirationDate ever be empty? If you wish it to display "Expired" if there is no expiration date, unclick the checkbox in your calc dialog which says, "Do Not Evaluate If All Referenced Fields Are Empty."

Posted

How cool! My help comes from MoonShadow just minutes after I left the TV after watching Yusef Islam (Cat Stevens) on Larry King Live. He even made a reference to the song, "Moon Shadow." Nice coincidence, since that's the first song I ever tried to learn on guitar.

I though I had tried Get(CurrentDate) and it didn't work but maybe I had some other error getting in the way. Anyway, thanks for that. Now my next question:

I have a ClientList table that includes a portal to display the current card Status from the ClientCard table (where the calculation field is). As it works now, the portal displays the results from the last time the calculation was performed which may have been before today. Is there a way to force the ClientCard table to recalculate the Status field so that references to it are always up to date?

Posted

Very cool indeed, gadfly, like Twilight Zone coincidence! shocked.gifgrin.gif

Is there a way to force the ClientCard table to recalculate the Status field so that references to it are always up to date?

That's the part I specified about making the calculation unstored. From within your calculation dialog, click 'Storage Options' and click 'Do Not Store Calculation Results...' It will always be up-to-date this way, even as the current date changes. wink.gif

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