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.

min and max functions

Featured Replies

  • Newbies

Greetings,

This one should be simple, and yet...

What I would like to do is a button that resets the date fields I use to filter the data displayed in a portal to the minimum and maximum date values of the table, so that all entries are visible and so that I can know what the date range is.

I tried this: (btw the Filter fields are global of course)

Go to layout ["LayoutName"(TableName)]

Show all records

Set Field [OtherTableName::FilterFromDate; Min(TableName::Date)]

Set Field [OtherTableName::FilterToDate; Max(TableName::Date)]

Go to layout [Original Layout]

...but it sets the filter fields to the active record's date instead of the minimum of the whole table!

Am I wrong or is there a way to do it without scanning every record through a script?

Thanks

  • Author
  • Newbies

Nevermind, I figured out! (I added a summary (minimum) field to the table)...

I knew it would be simple. Sorry for wasting your time :P

You could do this without any extra fields by sorting the records by date, going to the first record, setting the minimum, and going to the last record to set the maximum.

Or, stay in the Parent layout and do only this:

Set Field [ Parent::FilterFromDate ; Date ( 1 ; 1 ; 1 ) ]

Set Field [ Parent::FilterToDate ; Date ( 12 ; 31 ; 4000 ) ]

Set Field [ Parent::FilterFromDate ; Min(Child::Date) ]

Set Field [ Parent::FilterToDate ; Max(Child::Date) ]

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.