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.

Scroll to current month?

Featured Replies

I have my database currently corted by (effective date) jan-dec and also by a month sort calculation that separates these dates into months. When a user enters this layout the script automatically runs and sorts accordingly. I'd like for filemaker to scroll to the top of the current month say September, so the user immediately sees all current accounts.

 

What calculation would I use? I've tried the get current date function and all it scrolls to is a date in april.

 

Any help is greatly appreciated.

 

Thanks!

 

Matt

How about …
# ... your sort routine 
Go to Record … [ Last ] // unless that's already done
Set Variable ( $cm ; Month ( Get ( CurrentDate ) ) ] 
If [ table::matthewsMonthSortCalculationField = $cm ] // otherwise there are no entries for the current month, and the rest is moot
  Loop
  Go to Record … [ Previous ]
  Set Variable ( $overShot ; table::matthewsMonthSortCalculationField < $cm ]
  Exit Loop if [ $overShot or Get ( RecordNumber ) = 1 ]
  End Loop
  If ( $overShot )
    Go to Record [ Next ]
  End If
End If
This assumes that matthewsMonthSortCalculationField is defined as Month ( datefield ). Haven't tested this live, so no warranties whatsoever …
  • Author

I've attached my current sort order and a picture of my database for reference.

 

Thanks!

 

Matt

2.tiff

1.tiff

OK, so you have a summary layout sorted by month, date, last name and whatnot; then what is "Go to Portal Row" doing in the script? Anyway …

 

if your month field is the month number (is it?), then you could simply append the code I wrote above to your script, and it should work (sans Go to Portal Row, to be sure …); assuming it is correct in the first place, that is …

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.