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 expiry date range

Featured Replies

Hi can anyone offer advise on the best practice to script a find function please?

I have a "expiry date field" e.g.: 12/03/2018 and would like to have a script that could show records that fall within 8 weeks before or after the expiry date.

Thank you 

Use the Date( ) function to create dates 56 days before and after your expiry date, and use that in the Set Field script step. The Date( ) function takes care of months and years all by itself.

Enter Find Mode [ ]

Set Field [YourTable::ExpiryDate; Let( [~theDate = YourTable::ExpiryDate; ~start = Date(Month(~theDate); Day(~theDate)-56; Year(~theDate));  ~end = Date(Month(~theDate);Day(~theDate)+56; Year(~theDate)) ]; ~start & "..." & ~end )

Perform Find [ ]

Hi becham,

I would do this with a Conditional Formatting if you only want to view them.

Example file shows two different colors, one for past and one for future of the target date. You could use the same color for both fields

AnyDate represents your date field (you mentioned in your post).

Flag.fmp12

  • Author

Thank You for the sample file Lee that helps me understand the options i have much better.

kind regards

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.