AnsweredAssumed Answered

Script Help - Duplicate records

Question asked by truji_ on Nov 8, 2011
Latest reply on Nov 8, 2011 by philmodjunk

Title

Script Help - Duplicate records

Post

I have the following query that creates records in the SEDAC table based on students eligibility. However, a student may have more than 1 IEP with the same 'requirements' but a different meeting date. The IEP I need to report is the one closest to 8/1/2011.

i.e. a student named xyz has 2 IEPs'. 1 with a date of 2/1/2011 and the other with a date of 6/7/2011. I need the result to only show the records of the 6/7/2011 IEP. Any help is appreciated. Thanks

  • Set Field [ SEDAC::StartDate; "8/2/2010" ]
  • Set Field [ SEDAC::EndDate; "8/1/2011" ]
  • Go to Layout [ “IEP Page 1: Cover Page” (IEP_CoverPage) ]
  • Enter Find Mode [ ]
  • Set Field [ IEP_CoverPage::cMeetingDate; SEDAC::StartDate & "..." &SEDAC::EndDate ]
  • Set Field [ Students::o_SpecEd; "yes" ]
  • Set Field [ IEP_CoverPage::ReasonForMeeting; "Determine Eligibility" ]
  • Perform Find [ ]
  • Sort Records [ Specified Sort Order: IEP_CoverPage::IEPID; ascending ] [ Restore; No dialog ]
  • Go to Record/Request/Page [ First ]
  • Loop
  • Set Variable [ $SASID; Value:IEP_CoverPage::SASID ]
  • Set Variable [ $IEPID; Value:IEP_CoverPage::IEPID ]
  • Go to Layout [ “SEDAC” (SEDAC) ]
  • New Record/Request
  • Set Field [ SEDAC::SASID; $SASID ]
  • Set Field [ SEDAC::IEPID; $IEPID ]
  • Go to Layout [ “IEP Page 1: Cover Page” (IEP_CoverPage) ]
  • Go to Record/Request/Page [ Next; Exit after last ]
  • End Loop
  • Go to Layout [ “SEDAC” (SEDAC) ]

Outcomes