Skip 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.

Auto Fill Global Date Fields for Portal Filter

Featured Replies

I need to populate 2 global fields (Temp::TDG and Temp::TDG2) so my portal will automagically display the current months records.

I have a portal that displays the records that have been created and you can filter them by entering the To: & From: dates and it will display. But I want to have it automatically enter the current month into the fields so it will display without the user having to enter anything unless they want to look at a different month.

I can't seem to figure out the calc to make it happen because I want it to be dynamic so that if it see's 11/14/06 I want it to display To: 11/1/06 and From: 11/30/06.

Can anyone show me what the calc might look like. I can't seem to figure it out.

Nate

First day of the month is easy:

Date ( Month ( date ) ; 1 ; Year ( date ) )

Last day of the month is:

Date ( Month ( date ) + 1 ; 0 ; Year ( date ) )

That looks weird, I know; but FileMaker will interpret a day of zero to the last day of the previous month, and it also handles the month in a similar way when the month is > 12.

  • Author

AWESOME!

That worked like a CHAMP!!!

Here is what the final script looks like for future reference.

Set Field[Temp::tdg; Date ( Month ( Get ( CurrentDate ) ) ; 1 ; Year ( Get ( CurrentDate ) ) )]

Set Field[Temp::tdg2; Date ( Month ( Get ( CurrentDate ) ) + 1 ; 0 ; Year ( Get ( CurrentDate ) ) )]

Thanks for the help!! That is great!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

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.