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.

How to auto find dates within 3 months?

Featured Replies

How can I create a script to auto find all records in a date field within 3 months from today?

This is a straightforward scripting example.

You can create and save a scripted find then attach that to a button.

I suggest the "Script" forum if you run into issues.

It's also a good idea to provide more information in the questions you ask.

For instance, do we assume you have a 'Date' field that is stored with each record?

If not, there are different issues to deal with.

Hello Manny,

You are talking about a dynamic find here - one that changes as the date moves on. A stored find in a script will not do, as it will retain fixed criteria from the time when it was specified.

Instead, I suggest that you set up a scripted procedure that builds the find criteria by referencing the system date. Eg:

Go to Layout [Layout with your date field on it]

Enter Find Mode [ ]

Insert Calculated Result [YourDateField; GetAsText(Date(Month(Get(CurrentDate)) - 3; Day(Get(CurrentDate)) + 1; Year(Get(CurrentDate)))) & "..." & GetAsText(Date(Month(Get(CurrentDate)) + 3; Day(Get(CurrentDate)) - 1; Year(Get(CurrentDate))))]

Perform Find [Replace found set]

That will roll forward with the system date, so that your find will always return all records in which the entry in the 'YourDateField' field is within the range of +/- 3 months from the current system date.

Note that you can also use a portal for this. See the "home" layout in the Business Tracker example file.

  • Author

Thanks Ray, it worked beautifully.

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.