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

I think my Filemaker Pro is on crack...

Featured Replies

I am running a simple Show Dialog to troubleshoot one of my scripts...

If I run this calculation:

"Case ("10/10/2011" ≤ Month(Get(CurrentDate))+1&"/"&10&"/"&Year(Get(CurrentDate));"True"; )"

I get "True"

If I run this calculation:

"Case ("9/2/2011" ≤ Month(Get(CurrentDate))+1&"/"&10&"/"&Year(Get(CurrentDate));"True"; )"

I get ""

How does that make sense? I even ran:

Month(Get(CurrentDate))+1&"/"&10&"/"&Year(Get(CurrentDate))

And got 9/10/2011

So I know that at least FM is seeing the date it should....

What am I missing here?!

Solved by carguy195792

Go to solution

So I know that at least FM is seeing the date it should....

No, it's not seeing a date at all. "9/2/2011" is a text string and the comparison:

"10/10/2011" ≤ "9/2/2011"

returns True because in alphabetical order 1 comes before 9.

Use the Date() function to calculate a date from individual components.

"Case ("10/10/2011" ≤ Month(Get(CurrentDate))+1&"/"&10&"/"&Year(Get(CurrentDate));"True"; )"

Sorry, but that won't work...

You are trying to compare between a string item ("10/10/2011" - it's a string because it is in between quotes) and a date item - the data types cannot be used for comparison.

First you must convert the string to a date type.

Try GetAsDate("10/10/2011')

Problem "cracked"??

  • Author

Even with:

Case (GetAsDate(10/10/2011) ≤ Month(Get(CurrentDate))+1&"/"&10&"/"&Year(Get(CurrentDate));"True"; )

Still showing True...

I am only doing this test because the following seems to be acting reversed:

If[RecurringTransactions::RTNextDate ≤ Month(Get(CurrentDate))+1&"/"&10&"/"&Year(Get(CurrentDate))]

When RTNextDate = 9/2/2011 the Script doesn't fire, when it = 10/10/2011, it fires

P.s. - RTNextDate is a date field with a pop up Calendar, so I know it's a valid date...

You are trying to compare between a string item ("10/10/2011" - it's a string because it is in between quotes) and a date item

The right side of the equation is also a text string.

---

I recommend using the Date() function over GetAsDate() because it doesn't depend on the date format in use.

  • Author
  • Solution

Yeah I thought about the right side after I had posted that reply...

And the Date function did the trick!

Just for posterity's sake, the working Calculation was:

If[RecurringTransactions::RTNextDate ≤ Date(Month(Get(CurrentDate))+1;10;Year(Get(CurrentDate)))]

Thank you for all your help!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.