Help

Issue with Linking Payments to Attendance in Airtable

Topic Labels: Base design
360 1
cancel
Showing results for 
Search instead for 
Did you mean: 
dondon
5 - Automation Enthusiast
5 - Automation Enthusiast

Issue with Linking Payments to Attendance in Airtable

Hi!

I’m transitioning from managing a dance school in Google Sheets to Airtable and have encountered an issue when trying to link student payments with their attendance. I need the administrative staff to be able to see if a student has paid for a specific class in the corresponding period (month) when recording attendance, or if they owe for that month. In Sheets, this is incredibly easy, but in Airtable, it’s NOT (or perhaps I’m missing something, which is why I’m reaching out with the hope that’s the case).

Table Structure (simplified for this example):

  • Students Table:
    • Fields: Name, Contact Information, Attendance (Linked Records), Payments (Linked Records), etc.
  • Classes Table:
    • Fields: Class Name, Days, Schedules, Attendance (Linked Records), Payments (Linked Records), etc.
  • Payments Table:
    • Fields: Student (Link Record), Class (Link Record), Paid Period, Amount Paid, Payment Date, Unique Key.
  • Attendance Table:
    • Fields: Student (Link Record), Class (Link Record), Date, Present (Checkbox), Period, Unique Key, Amount Paid.

Problem Example:

A student, for example, "Juan Pérez," is enrolled in several classes, including "Ballet Mondays and Wednesdays" and "Contemporary Dance." Below is an example of how payments and attendance are recorded for a single period, August 2024:

Payments Table:

Student Class Period Amount Paid Payment Date Unique Key
Juan PérezBallet Mondays and WednesdaysAugust 2024$100August 1stJuanPérez-Ballet-August24
Juan PérezBallet Mondays and WednesdaysAugust 2024$50August 5thJuanPérez-Ballet-August24
Juan PérezContemporary DanceAugust 2024$80August 3rdJuanPérez-Contemporary-August24

Juan made two payments on different dates for the August 2024 period for his ballet classes.

Attendance Table:

Student Class Date Present Period Unique Key Amount Paid
Juan PérezBallet Mondays and WednesdaysAugust 3rd, 2024YesAugust 2024JuanPérez-Ballet-August24$150
Juan PérezBallet Mondays and WednesdaysAugust 5th, 2024YesAugust 2024JuanPérez-Ballet-August24$150
Juan PérezContemporary DanceAugust 4th, 2024NoAugust 2024JuanPérez-Contemporary-August24$80
Juan PérezContemporary DanceAugust 7th, 2024YesAugust 2024JuanPérez-Contemporary-August24$80

Note: In the "Amount Paid" column of the Attendance table, the sum of payments made for the specific class and period should appear. This is the column I’m struggling to create easily without using Linked Records between attendance and payments.

Difficulty:

In Google Sheets, this was solved with a simple formula like SUMIFS. For example:

=SUMIFS(Amount column in 'payments', Column of student names who paid, Reference to the student according to the row in the attendance table, Column of class names, Reference to the row with the class in the attendance table, Column of periods in the payments table, Reference to the period in the attendance table)

Conceptually, Google Sheets sums all payments that match "student," "class," and "period." You can add as many conditions as you want.

But in Airtable, I find myself having to create unique keys that combine Student, Class, and Period for both the Attendance and Payments tables, and then create automations to link payments with attendance. This has proven to be complicated and prone to errors, especially if attendance records are created after the payment is made, or if the automation failed for some reason and associated a payment with too many attendance records.

(Without linking payments and attendance using a unique key for "student-class-period," Lookups and Rollups aren’t helpful because they don’t allow me to add conditions relative to the row in the attendance table). For example, it’s easy to sum all payments for a student using a rollup, but it’s not easy to sum all payments for a student for the month I’m viewing in the attendance table and for the class I’m viewing in the attendance table. That’s not easy! (Or it might be, but I’d have to constantly change the field’s filter, and that’s not practical).

I believe that Student, Class, and Period effectively define the relationship between attendance and payments. Payments and attendance are linked because they share Student, Class, and Period.

Questions:

  1. Is my design correct, or could I modify and improve the design to make calculations easier?
  2. Is there no way to request a Rollup of the “amount paid” for those payments that match Student, Class, Period with the row in question in the attendance table? I can do a Rollup of the student’s payments or filter them by month, but they’re filtered by a single month configured in the field, and they can’t be filtered by the month corresponding to the row of attendance we’re observing.
  3. I can do a Rollup if I link all the attendance records (with their different dates for the month—attendance on 1/8/2024, on 3/8/2024, on 8/8/2024) with the payment, but this complicates management.

Of course, if each payment is manually linked to each attendance date for a student in a class, the level of linkage needed to summarize the information is achieved. But this is very labor-intensive manually, and I want a solution that requires less manual work. The school has hundreds of students and dozens of classes. We can’t do it manually—it would be less productive than the current system.

I managed to create an automation that links each payment with attendance. But if all the attendance records for a month aren’t created in advance, the payment becomes unlinked from the attendance, and this doesn’t seem like a robust and elegant method. I could try re-linking them or always creating attendance records before the payment. But the reality of the business’s daily operation makes this difficult to accomplish. I would like something elegant and robust. For example, with Google Sheets, it’s truly robust. The summing always works regardless of when they pay or when the attendance is recorded. And since Airtable is a real database (in Google Sheets, I have to use a lot of IMPORTRANGE and XLOOKUP to achieve something resembling related data), it should be easier.

What I want is an efficient and robust way to show in the Attendance table if the student has paid for that specific class and period without having to rely so much on complicated automations or unique keys. I imagine there must be a solution that doesn’t require automations. After all, the “Students,” “Classes,” “Payments,” and “Attendance” entities are linked together.

Thanks for your help!

Federico
1 Reply 1
RockyCCChong
6 - Interface Innovator
6 - Interface Innovator

Hi Fererico, 

Your post is lengthy, and I will try to address your concerns to my best ability. I ran a Children's Gym a few years ago, and the issues you mentioned do resonate with me. Thus, my answers address both the tech and the business issues, albeit not in order of importance or priority. 

1. "But in Airtable, I find myself having to create unique keys that combine Student, Class, and Period" - why do you need to do so? Every row in airtable has a record ID, so I am not sure the purpose of creating this additional ID. 

2. In general there are 2 types of classes, by Term or Perpetual (some call this rolling). For Term classes, there is a definite number of classes within the Term. So for example for Ballet Grade 3 Term 3: July, August, Sept would have 10 classes. From a table standpoint, Ballet Grade 3 Term 3 would have 10 child links to the Attendance table for each class. Every row in the Attendance table would have a date, time and Students attended. 

3. For Perpetual classes, these are usually for classes available all year round, and students may join at any time in the year. The selling model is in a package of 10 classes. So, if you follow this model, then it is necessary to assign the Attendance to the Student once payment is made. 

4. So, the tricky part is where Make Up classes come into play. Although you didn't mention this, but my previous policy mandates Make Up within the same week, OR within 2 weeks after the 10 week period. 

5. I do think that the creation of Attendance classes and link them to the Class is necessary, and can be automated. However, do note the days that are Public Holidays that would push the classes out. 

My 2 cents worth. For your kind consideration.