Selecting multiple records to process, linking tasks to appointments

Hi All,

I have a Tasks table, and an Appointments table, and I often find myself needing to manually link multiple tasks to a a single appointment.

Say we are scheduled to meet with customer XYZ next Tuesday, and I have 30 tasks for them, but I’ll only be able to get to 5 of them next Tuesday. So I want to link those 5 tasks to the appointment.

Is there a way to select those 5 tasks and link them all to one appointment? So far I have experimented with using a checkbox column in the Tasks table, something like “Ready to Schedule”, and that works okay, but it creates multiple records in the Appointments table, with the automation running the script after each row is checked.

Is there a way to have a script run on the selected records (the checkbox on the far left of each row, not an added checkbox column)?

Or am I thinking about this the wrong way? Is there a different approach you would take with this use case? In general I find myself wanting to select several rows and do something with all of them. Schedule them, update a single select status, etc

Appreciate any ideas. Thank you!

Welcome to the community, @rtr! :smiley: Here’s one possible way of solving the problem. It requires some scripting knowledge (or someone who might be willing to write a quick script for you; hit me up if you’d like some help).

The first part is similar to what you already described: using a checkbox to mark the records. However, this checkbox wouldn’t trigger anything. It would simply act as a marker. The trigger would be a button field—with the button labeled something like “Link to Appointment”—that triggers a script in a Scripting app. The button could be clicked on any of the selected records, or even on one that’s not marked. It wouldn’t really matter because its purpose is simply to run the script. The script would look for checked records and either ask you to select an appointment record to link those task records to, or possibly ask for some details that could be used to create a new appointment record before linking.

Welcome to the Airtable community!

You can do a lot with scripting, but not everything. Scripting has no access to the checkboxes on the far left.

Does the appointment record exist already?

Another option is to have a script that you run from a button in the appointments table. Click the button and then the script identifies all the potential tasks. Then have the script prompt you for which of those potential tasks to link. Depending on the number of available tasks and your preferences, you could use either a scripting record picker or scripting button fields.