Multiple row insert, how to get correct number of lines?

Hi there, newbie here!

I’m building a system for a training establishment to track courses, take attendance, and so on.

I’d like for an instructor to be able to take registration at the start of each session of any given course. If there are 8 students in the course, I’d like for a multiple insert form to be in a grid with a row for each student, with a checkbox for present/not present, and a notes field.

Any clues how I’d do that?

Thanks!

Austen

Hi austenozzy.
I’d use a grid with a “Run” button.
It allows you to select the rows you want and code what you need to do in the “OnFinish” event of th button.
Hope it helps.

Many thanks, jefch.

Could you point me to the docs for this, please? Or is there an example of this in the sample applications?

Cheers

Nothing fancy needed.
Instructor selects a course, [courseid], it takes you to a page that runs a sql…
It grabs each student registered for [courseid] and inserts into a temp_attendance table.
Show that Editable Grid to the Instructor who can then mark Attendance, notes, whatever. When they click ACCEPT, it then dumps the data into a real attendance table.

https://www.scriptcase.net/docs/en_us/v9/manual/06-applications/02-grid-application/19-buttons/
Look at the last section