Jump to content

Creating a script that will take me from one set of records to another.

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

Recommended Posts

I have created an attendance program for students in a school. Each day I create a new set of records for ten students showing whether they are absent or present. At the end of the month I select the month's date range, then use refind to pull up each student individually and print a report that shows the dates he/she is present and absent for that month. This works well, but pulling up each student individually is labor intensive. I would like to create a script that would allow me pull of all of John Does' records within a specified date range, this could be 20 records per student, print the report and then go to Mary Smith, pull up all of her records within the same date range, print the report and cycle through the complete listof students until all the monthly reports are printed. Any Ideas? Thanks. Bob Sherman

Link to comment
Share on other sites

If you had used a relational system it would have been easy. Each "master record" is a sutdent. The "related" record is the daily attendance. Create a portal on the master record and it will list each attendance. Print this record out (or better still create a scrip that uses the "Go to Related Record" step and print from the related file, then return to the master record.

A script could then be created in the mater file that goes to the first student, runs the "print attendance record" script, then goes to the next student, prints, and so on.

There is still a change that you can convert the databass you have to a relational system without too much work.

1) Make a backup of the system. SERIOUSLY.

2) Create a new database with just the student's details in it -- ten records. Give each record a unique serial number (create a number field, autoenter serial number, prohibit modification of value).

3) Define a new number field in the existing database, this will contain the id number that links it to the student. Define a relationship in the new database to the old database, using the serial number and number fields just created.

4) The hard work: in the old file each record needs to have the serial number entered that relates the record to the student. Easiest way is to work out the id for each student; in the old database perform a search for the first student (by name or whatever) then use the Replace command to insert the ID number into all of the found records. Repeat this process for all the students.

5) Create a portal in the master databse using the relationship to the attendances. Browse the database and the related attendances should all be listed.

6) Work on the scripts to automate the printing process.

Link to comment
Share on other sites

This topic is 8040 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.