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.

Data selection within a timeframe

Featured Replies

Need help on this one.

To be able to get a nice overview of current projects and urgent deliveries I would like to make a button, which will switch to a new window or layout, that shows all projects (table view or something similar) that have a closing date within one week of the current date. Is this possible and if so How!? Don't know how I would start scripting this one? Can somebody help me out?

Thanks,

Dutchy

Yes, you'd need a script. Something like:

new window

go to layout [name-of-the-nice-layout-you've-made]

adjust window [resize to fit]

move/resize window [,,wherever,wherever]

enter find mode

set field [due in the coming week, "Y"]

perform find[]

Let us know how you get on... :P-)

* "due in the coming week" would be a new calculation field defined as something like:
if(get(currentdate) - closing date 

Why create a calculation here (and add to the number of your fields, which grows too large as it is)? The calculation can reside only within the script as:

"<" & Get ( CurrentDate ) + 7

You didn't indicate if any projects OLDER than the current date should also show. If not, you can produce a range as:

Get ( CurrentDate ) & ".." & Get ( CurrentDate ) + 7

If your record number is quite large, you might also want to consider using Go To Related Record[]. In this way, it will remain quite fast and also provide other functionality (such as filter portal) for display of various Project status' and date ranges.

LaRetta :wink2:

  • Author

Hello James,

I can't seem to get the "due in the coming week" calculation right. what do I fill in for "Y" is that the closing date field?!?

Other little problem is that the closing date's that will be entered into the database will be European dates (day/month/year) and current date in set as month/day/year. Where can I change the date settings for the current date. Can't seem to find it in "date format"

Thanks for your help so far,

Dutchy

Edited by Guest

Just put in, literally, "Y" - short for "yes". The new field will then contain "Y" if the closing date is in the next week, and will be empty if it's not.

The script I gave you will search for records which have "Y" in that field - in other words, records which are due in the next week, which is what you want to see.

Don't worry about the date formats. As long as it's a FileMaker date field, FileMaker will deal with the formatting internally. "Format date" only changes the way the date is displayed on a layout, and doesn't affect the data stored at all.

James

  • Author

Thanks James,

It works great now.

Dutchy

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.