AnsweredAssumed Answered

Generating Attendance Form - Loop exits early

Question asked by ReynaldoRamirez on Aug 22, 2011
Latest reply on Dec 10, 2011 by filemaker72

Title

Generating Attendance Form - Loop exits early

Post

I am trying to create student attendance records so that I may mark each student Present, Excused Absence, Unexcused Absence.

 

I am using three databases in this scenario/

Student Information

Student Attendance

Class Dates

 

Here are the relationships.

Student Information::SSID>--------=-----------<Student Attendance::SSID  (These relate to their student ID)

Students Attendance::Date>--------=-----------<Class Dates::Date

 

I am using one master script that is calling on two subscripts.  The problem is that the loop portion of the script randomly exits early and doesn't generate a new record for all the students in the found set.  It gets about a third to half of the way.  Also, something to note...when I get to the Get SSID portion...after I enter the date and the first script is paused...I get this "command-period" symbol.  I have to press "command-period" before it actually runs the second script.

 

Here is the master script: Attendance Form

Perform Script [ “Attendance: New Record with Same Date” ]

Loop

  Perform Script [ “Get SSID” ]

End Loop 


Subscripts:

Attendance: New Record with Same Date

#Creates 1st record for the new date and first student record

Go to Layout [ “Student Record” (Student Information) ]

Perform Script [ “Filter Enrolled” ] (#Creates a found set for enrolled students)

Go to Record/Request/Page [ First ]

Set Variable [ $id; Value:Student Information::SSID ]

Go to Layout [ “Attendance” (Student Attendance) ]

New Record/Request

Set Field [ Student Attendance::SSID; $id ]

Pause/Resume Script [ Indefinitely ] 


Get SSID

#Creates new student records inputing SSID and the Date

Set Variable [ $date; Value:Student Attendance::Date ]

Go to Layout [ “Student Record” (Student Information) ]

Go to Record/Request/Page [ Next; Exit after last ]

Set Variable [ $id; Value:Student Information::SSID ]

Go to Layout [ “Attendance” (Student Attendance) ]

New Record/Request

Set Field [ Student Attendance::SSID; $id ]

Set Field [ Student Attendance::Date; $date ] 


-----

 

What am I doing wrong here?  When I run the "Get SSID" script manually...it does stop after I get to the last student, but it won't do it when I put it in a loop.

Thanks for your help!

 

Outcomes