2 Replies Latest reply on Mar 20, 2015 4:31 AM by Stu412

    MAX Date?



      MAX Date?


      Hi there

      I've a table full of values, each row with a date.  I want to find the highest (most recent) date from this table.

      I've tried the calculation MAX(Date) but this doesn't seem to be working - it just returns what clearly is not the MAX date I'm after.

      Am I missing something, can this be done?  


        • 1. Re: MAX Date?

          You might look up Max() in FileMaker help. You'll find that Max ( Field ) is only looking at the current record. Max ( 3 ) is 3 after allwink.

          What to do about this depends on context and whether you just want the date or the record that comes with it.

          A summary field can be set up to return the max date. This will return the latest date over all dates in the current found set if you layout is based on the same table as where you defined the summary field.

          Max ( relatedTable::Date ) will return the maximum date over all records in the related table that are linked to the current record from which your Max function calculates--and this can be set up so that "all related records" are all records in a table.

          And there are ways to use sorting that not only brings up the max date, but the record in which it is found. A single row, sorted portal for example could sort on date to show the max date and make all the other fields that come with that record accessible.

          A found set can be sorted for a list view to achieve much the same result.

          • 2. Re: MAX Date?

            Summary works perfect, staring me in the face all the time :)

            Thanks Phil