Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6768 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

  • Newbies
Posted

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

Posted

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) ]

This topic is 6768 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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