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.

finding "30 days ago" without having to enter an actual date

Featured Replies

i'm hoping there is already a way to do this. so far i know that i can type "//" to indicate the current date. what i'm trying to do is indicate a range in find mode that would return records entered from 30 days ago through the current date without having to type in any actual dates. right now i'm having to settle for using, for example, "4/22/2007...//" to indicate the range from 30 days ago through today. tomorrow, the range will only update on one end. the 4/22 won't update to 4/23. that's why i wanted to use "//-30" for that end of the range. can anyone tell me if there's a way to do this? i'm using FileMaker Pro 6. thanks!

Do not double post in the Forum, I have deleted your other two post on the same topic.

Lee

You could do it with a button tied to a script:

Enter Find Mode[]

Set Field [ Date , status(currentdate)-30 & ".." & status(currentdate) ]

Perform Find[]

In FM8, there are some other options for finding with wildcards, like 4/*/2007, but that's not exactly what you're looking for.

If your dates don't go into the future, you can also use an open range Find, in the form:

>4/21/07

or

>=4/21/07

Edited by Guest

  • Author

Ender,

I have entered the script you recommended, yet when i click on the button to launch the search, it says there are no records that match the request. any ideas? thanks.

Sparrow

In version 6, you need to use Insert Calculated Result[] instead of Set Field[], when entering a non-date into a date field.

  • Author

i am not entering any non-dates. each of my records has a field called DATE ADDED which is auto-filled using the current system date in standard MM/DD/YYYY format...

  • Author

Ender,

the way i understand Set Field is that it enters the result of a calculation into a specified field. i have been able to get your suggested script to work if i simplify it to:

Enter Find Mode[]

Set Field ["DATE ADDED", "Status(CurrentDate)-30"]

Perform Find[]

which does automate the "30 days ago", but it ONLY finds exactly 30 days ago.

the result of the calculation must be a date. i start having problems when i try to Set Field to more than one date or a range of dates. is that supposed to be possible?

perhaps the syntax is a bit off?

you suggested:

Set Field ["DATE ADDED", status(currentdate)-30 & ".." & status(currentdate)]

which makes sense to me intuitively. but FileMaker doesn't seem to be translating that to "30 days ago thru Today".

any additional help from anyone would be greatly appreciated.

  • Author

Success at Last! Thanks, John. And I understand now why Insert Calculated Result was necessary.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.