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.

Featured Replies

I am trying to create a report where the user can click a button and bring up a report of all newly created records within the past 7 days.

The only thing I need to know is how to find the correct date range. The range should read: TodaysDate - 7 days to TodaysDate (or >TodaysDate - 7 days.

In FM 3 how does this work? (//-7)..// doesn't do the trick. Can this be done?

Thanks.

I do it by having a calculated field to show the days since the record was created (or in my case since a particular check was carried out). The calculation is simply:

Today - Creation Date

You can then find all records with a value >7 in the Days Since Created field

  • Author

Awesome -- Thanks. And simple too.

Shane

John-

If you do the search in the way you explain, won't you have a very long search (especially in a database with a lot of files)? By making the calculation based on the days elapsed field, the search is happening on an unindexable field. If the database had to index the field everytime the report is run, it would probably be very tedious.

Why not just promt the user for the date you want to start from & then have the script find the desired date range?

Just a thought...

Later :-)

Good point but I checked and the field and is indexed! It takes less than 4 seconds using a PC with a 133mHz processor and with a database containing 2300 records.

I actually use this field for other purposes as well.

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.