Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to refer to TODAY in a simple calculation...

Featured Replies

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

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."

  • Author

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?

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

  • Author

Thank you very much. My next question will be a little more challenging, I think...

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.