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 records that have been added or modified within the last 7 days

Featured Replies

  • Newbies

Newbie question ...

I'm using a database with a creation date field, and a modification date field.

I'd like to find records that have been created or modified within a specified number of days, and then create a script for this.

Can anyone help?

For a simple find, Read the manual and/or the Online Help when FileMaker is open. What you are looking for is [color:blue]Finding ranges of information. If you need to do this often, consider a script using the Find Script Step.

Lee

You will only need to search for the Modification Date. When a record is created, the Modification Date grabs the Creation Date the first time. With vs. 6, you can't set a date field with a calculated result. So you need to use Insert Calculated Result and that means that the Modification Date must be on the layout. Pseudo-script would look something like this:

Go To Layout [ layout containing Modification Date ]

Set Error Capture [ On ]

Enter Find Mode [ ] ... uncheck pause

Insert Calculated Result [ Modification Date ; ">=" & Status ( CurrentDate ) - [color:green]If ( gNumbDays , gNumbDays , 6 ) ]

Perform Find [ Replace ]

If [ not Status ( CurrentFoundCount ) ]

Show Message [ "No records modified since " & Status ( CurrentDate ) - [color:green]If ( gNumbDays , gNumbDays , 6 ) ]

Show All Records

Go To Layout [ original layout ]

Halt Script

End If

... do whatever you wish with the modified found set.

If you wish to specify a different number of days for the search, insert a number in gNumbDays. If you leave it blank, it will assume default of 6.

Edited by Guest
Added gNumbDays

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.