Hi all, we have an app that requires some data manipulation and I would be happy to hear thoughts and suggestions as to how to do this in the best way in Tadabase.
Basic app structure:
- Students table
- Volunteering Locations table
- Volunteering Assignments table
The first 2 tables are pretty basic/standard. The Volunteering Assignments table has columns:
- Student (connection)
- Location (connection)
- date
So for example, the assignments for today would look like (imagine 200 records like this for each day):
- John, Farm A, 05.05.26
- Jack, Farm A, 05.05.26
- Will, Farm B, 05.05.26
Each day, the manager is responsible to make the assignments for all 200 students (so 200 records per day). Let’s say the manager logs in this morning, and decides to create all 200 assignments:
- Manager clicks “create empty records for today’s assignments”.
- This triggers a backend server function that creates 200 new records for all 200 students, with the date of today:
- John, [empty location], 05.05.26
- Jack, [empty location], 05.05.26
- Will, [empty location], 05.05.26
- The manager then starts assigning the locations (inline editing).
- When done, we have today’s assignments.
This is the easy part. Now, let’s say after step 2, the manager decides to click on “pre-fill today’s assignments with the data from date X”. We now have 200 “empty” assignment records waiting to be filled, but they are “irrelevant”. So what do we do? We trigger a backend function that:
- Batch updates all 200 current “empty” records to be
inactive(API batch update) - Fetches all 200 records from date X (API fetch)
- Prepares a CSV with the data from those records, but with today’s date instead.
- Imports the CSV into the assignments table (API import)
Notice that in this case we have “stale” records (inactive) that are obsolete, so we also need a scheduled task that will delete them from time to time.
I was wondering if Tadabase has built-in tools that I don’t know about, which we can use to improve this process. Ideally to rely on backend functions as less as possible.. but I don’t see any other way for now.
(PS - if the Import API feature had the ability to MATCH and UPDATE current records, and not only import all records blindly, that would make the process much cleaner, but such an option only exists in the manual import process).