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.

Find records for last 7 days problem

Featured Replies

I have a request to find records entered in the last week. There is a Date Entered field. The script I used is:

enter find mode

insert calculated result

Status( CurrentDate) & "..." & (Status( CurrentDate) - 6)

perform find

My results were not found records but an error message that the date must be in the 1/1/2005 format. When I clicked continue the information in the "Date field" is 732215...732221. Apparently this is Filemaker code for 9/28/05 through 10/2/05.

Before I started I entered five records with the 9/28/05 through 12/2/05 dates. In find mode using 9/28/05...10/2/05 returned all five records.

I have tried scripts using both Set Field and Insert Calculated Result without success.

I confirmed that the DATE field is set as a Date field. I even changed the date format to 1/1/2005 from 1/1/05 just for the heck of it. The "Specify Calculation" says The calculation must be a Date, I just don't know what is going wrong. Do you have any ideas?

You will need to use global fields.

i) A global calculated field called "gCurrentDate"

= status(currentDate)

ii)Another global field called "gLastWeekBegin"

= status(currentDate)- 6

iii) A global calculated text field which will be a concatenation of i and ii above called "gDateRange" to look like this:

= gLastWeekBegin &"..."&gCurrentDate

Now write your script as follows:

Go to layout (specify the layout that has the field you need to search from)

Enter Find Mode

Set Field [DateField]; "gDateRange"

Perform Find

Hi Chuck, welcome to the forums.

Please do not make it a habit of double posting.

Chuck you need to specify the Date to be written as Text.

DateToText( (Status( CurrentDate) - 6) ) & "..." & DateToText(Status( CurrentDate))

then your find script will be:

Enter Find Mode []

Insert Calculated Result [DateToText( (Status( CurrentDate) - 6) ) & "..." & DateToText(Status( CurrentDate))]

Perform Find [Replace Found Set]

  • Author

Thanks John,

That was exactly what I needed. I would never have guessed that.

Sorry about the double post, I couldn't remember where I posted the message.

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.