Jun 26, 2021 07:00 PM
Hi!
I’m trying to set up an automation where when a new record is created in an “Events” table, a script runs that checks whether the event participants are already scheduled for other events at the same time.
I know that both @Kamille_Parks and @Jeremy_Oglesby have created scripts that fulfill this requirement (great job by the way!), both of which can be used in the Scripts App, but since both of them require inputs and output tables/headings, they don’t play well with scripts in Automations.
Has anyone adapted these scripts to work within an Automation? This would be an amazing feature to have, as it could run in the background whenever someone submits a form for a new event.
Thanks for the help!
Sean
Jun 26, 2021 07:21 PM
At this risk of consigning myself to once more redoing these scripts:
How exactly do you want the script to function? Assuming you want the Automation-ized script to detect if the trigger record conflicts with another, what’s it supposed to do if a conflict is found?
Jun 26, 2021 09:36 PM
Hi @Kamille_Parks ,
Thanks for the quick reply! Here’s the full use case:
I would set up an automation that triggers whenever an event is created OR updated, and would run a script that checks whether the event participants are already scheduled in another event, and, if so, notify the scheduler by updating the new event record with that information.
Ideally, the scheduler would be notified of the overlap before even scheduling the event (for example while he is in the form itself), but I haven’t found a solution for that, so I’m relying on automation to notify him after the fact.
In terms of the script’s output, it could come in the form of a comma separated string, which would contain the names of the double-booked participants and the events they were already booked in (I.e. “John Smith | Meeting with Jack on 7/20/21, Jane Doe | Rehearsal #3 on 7/20/21”), and would be added to a field in that record. Or it could create a new record in a “Conflicts” table that would add the participant, the first event, and the new conflicting event.
Let me know if that makes sense, and thanks for answering so quickly!