Aug 13, 2024 01:38 PM
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).
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:
Juan Pérez | Ballet Mondays and Wednesdays | August 2024 | $100 | August 1st | JuanPérez-Ballet-August24 |
Juan Pérez | Ballet Mondays and Wednesdays | August 2024 | $50 | August 5th | JuanPérez-Ballet-August24 |
Juan Pérez | Contemporary Dance | August 2024 | $80 | August 3rd | JuanPérez-Contemporary-August24 |
Juan made two payments on different dates for the August 2024 period for his ballet classes.
Juan Pérez | Ballet Mondays and Wednesdays | August 3rd, 2024 | Yes | August 2024 | JuanPérez-Ballet-August24 | $150 |
Juan Pérez | Ballet Mondays and Wednesdays | August 5th, 2024 | Yes | August 2024 | JuanPérez-Ballet-August24 | $150 |
Juan Pérez | Contemporary Dance | August 4th, 2024 | No | August 2024 | JuanPérez-Contemporary-August24 | $80 |
Juan Pérez | Contemporary Dance | August 7th, 2024 | Yes | August 2024 | JuanPé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.
In Google Sheets, this was solved with a simple formula like SUMIFS. For example:
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:
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!
Aug 14, 2024 03:17 AM
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.