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.

Search for criteria within a range of dates in FM7

Featured Replies

I was wondering if someone could help explain the proper syntax for creating a script where the user could select a month to search for from a dropdown list(ex: February) and the database would find all contributors who had given money in that month by searching the contributor table. I figure there is a simple command for this but I havent come up with anything in the scriptmaker because all dates stored in the contributor table are in ##/##/#### format (ex: 02/01/2004) which is different from just the spelled out word "February" found in the drop down list. Hopefully I'm being clear on this... thanks for any help, I greatly appreciate it!!

PS: Later down the road, I would like to search for all contributions given within the past 3 years based on the current date from a specific contributor in the table. Im guessing this would be another type of script??? If I'm missing any key date syntax rules please feel free to point them out because numerous other date queries will be heavily used by the system I'm setting up for our client. Any advice on solving this would be great too! Thanks again!

FileMaker Version: 7

Platform: Windows XP

To search for all dates in a month, you should create a calc field Month = MonthName ( DateField )

Then on a search layout, in find mode, your users can use a value list on the Month field to search for all records with that month name.

You will probably need to have a Year field too, for narrowing the search to a specific year: Year = Year ( DateField )

When I script searches like this, I auto-fill some of the search fields (like putting the current year in the Year field.) Anything to make it easier and more foolproof is always good.

To search on a range of dates, use ">4/5/2003" or "4/5/2003...4/5/2004".

I'm working with FM7Newbie on the same project. To clarify our problem in the PS: We want to be able to search for all contributions made by an individual in the last 3 years to date. This is search will be made 100s of times a day and it would really be a pain to manually enter "04/20/2001...//" everytime

I need the syntax to perform a find on the following range: "(Today minus 3 years)...//"

so we can hard code a button to do the find in one click (and SAVE A LOT OF TIME).

Script should look something like this:

Enter Find Mode []

Insert Calculted Result [ Contribution Date , Status(CurrentDate) - 1095 ]

Insert Text [ Contribution Date, "...//" ]

Perform Find []

Thanks, man. Works perfectly

FileMaker Version: 7

Platform: Windows XP

That will work for this year, 2008, 2012, etc. For most other years it will be off by one day. I suggest you use

Date(Month(Status(CurrentDate)), Day(Status(CurrentDate)), Year(Status(CurrentDate) - 3)

instead.

Smarty.

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.