Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Assigning Seating Numbers

Featured Replies

I am creating at database that will automatically assign seating in an auditorium.

The layout of the auditorium is configured in sections, rows and number of seats. Each section does not have the same number of rows nor the same number of seats in each row.

Question: Is there a concise way to script this?

The long way is to create global fields to tell what is the maximum number of rows in each section, then one for each row to tell how many max seats.

Then create a looped script to go through each section.

I am assigning seats to 400 elementary students. I have a table with all their names. All kids in grade 1 need to sit in Section A. All kids in grade 2 need to sit in section B and so on.

Is there a better way? Thanks for your help.

My approach would be to create a new table called seats, which contained the following:

Unique Key

Seat Number

Row Letter

Section Letter

There is one record in the file for each seat in the auditorium. You can use the row letter and section letter via a find command or a relationship so you extract a found set for a specific row or a section. This means you don't need to store information about row lengths or numbers of seats in a section because you can extract this information directly through counting the number of records of each type in the table.

If you only have to deal with one performance in the auditorium at any time, you could simply add the two fields below which would allow you to manage assigning a list of students with their section choice into the records in the table

Seat Status (e.g empty|assigned)

Student ID (the unique ID of the student who gets this seat assigned.

You can now find any unassigned seats in a specific row or section.

For the next performance you reset the assignment status to empty and null the student ID.

If it is necessary to handle multiple performances, then I would create a new table called performanceSeats. This new table has the fields

Unique Key

Performance ID

Seat Number

Row Letter

Section Letter

Seat Status

Student ID

Whenever you need to create a new performance (which has a unique ID) you have a script that loops through the seats table and creates a new equivalent record in the performancSeats table which contains the seat information and the performance key. To allocate a student into an appropriate section for a specific performance, you just need to add the performance key into you find command or relationship.

HTH

Edited by Guest

  • Author

HTH,

Thanks for the info. Question: Since I already have all the students in a table, how would I go about writing a script that would automatically assign them to the seats? Would I script a copy and paste student ID and loop it?

Thanks so much for your help!

Is this the logical limitation? Are you saying that even if seats are vacant in Section A, no Grade 2 students can sit there? Can we assume that you have enough seats in each section for the grade level who's supposed to sit there?

It seems to me that if both above statements are true, that you could fill all the seats in a section in one operation. I can think of a couple ways to do that.

Go to Students. Find for Grade 1 students.

Import into a join table.

Go to Seats. Find for Section A.

Import those Seats into the join table, importing the section and seat#.

Use the Import option, Update existing records. Do NOT check [ ] Add remaining records

This will result in all Grade 1 students being assigned a Section A seat for that event (or whatever time period this covers; you didn't say).

Do the same for each Grade. If the Sections are always a counterpoint of the grade, ie., 1 = A, 2 = B, etc., then a modular loop could do each grade.

Section = Choose ( Grade; ""; "A"; "B"; "C"; "D")

or use,

Section = Middle ( "ABCD"; Grade; 1)

Or, if there's just a few, write it out.

  • Author

Thanks so much for the advice! It is working like a charm.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.