Would "date closest" mean the earliest meeting date not already in the past?
Set Field [ IEP_CoverPage::cMeetingDate; Get ( CurrentDate ) & "..." &SEDAC::EndDate ]
You may then need to use Sort your records in ascending order by meeting date and omit all records except the first one found.
Meeting Date closest to 8/1/2011 - so I'm looking at dates in the past.
I cant use current date because all end dates are before 8/1/2011.I need to report only the IEPs whose meeting date is closest to 8/1, even if they have multiple IEPs.
In that case, sort your found set by this date field in ascending order and omit all but the first record in the found set this produces.
If [ get ( FoundCount ) > 1 //more than one record was found ]
Go To Record/Request/Page [next]
Omit Multiple [no dialog ; Get ( FoundCount ) - 1]
would omit all but the earliest record found.
I don't think, though that this will work for you as it seems you are finding records for multiple students and need to find the earliest date for each such student you find. That's a lot messier but can be done with a script that omits the extra recrords while looping through your found set.
Sort [no dialog ;restore ] //sort first by student, then by meeting date in ascending order
Go To Record/Request/Page [First]
If [$StudentID = Students::StudentID // same student as previous record ]
Exit Loop If [Get (RecordNumber ) = Get ( FoundCount ) //stop loop if you omitted last record ]
Set Variable [$StudentID ; value: Students::StudentID]
Go To Record/Request/Page [next ; exit after last]