What is your coding background and who wrote the script you posted?
Due to the writing style, it is a little hard to follow the logic in your script on a quick read, but I don't think that is causing your problems.
The script currently runs for every record in the table. You have a few options. You can modify the script so that it only runs on a triggering record. Note that if you use an automation script, determining when to trigger the automation can get a little tricky because when the human thinks "record creation" happens doesn't always match when the computer thinks record creation happens.
Another option is to use a filtered view that only shows records that have not been processed. Then run the script only on records in that view.
Another option is to have the script determine which records have been processed, and to filter out records that have been processed. (This is your original request.) However, of the different options, this one requires the most technical coding skills and a solid understanding of the related aspects of the base schema.
What is your coding background and who wrote the script you posted?
Due to the writing style, it is a little hard to follow the logic in your script on a quick read, but I don't think that is causing your problems.
The script currently runs for every record in the table. You have a few options. You can modify the script so that it only runs on a triggering record. Note that if you use an automation script, determining when to trigger the automation can get a little tricky because when the human thinks "record creation" happens doesn't always match when the computer thinks record creation happens.
Another option is to use a filtered view that only shows records that have not been processed. Then run the script only on records in that view.
Another option is to have the script determine which records have been processed, and to filter out records that have been processed. (This is your original request.) However, of the different options, this one requires the most technical coding skills and a solid understanding of the related aspects of the base schema.
I ran into the script Here and it definitely does what I want it to do if only run once after all the data is there. I'm looking to modify it so it doesn't run on every record on the table, but instead on the one that was just created (via form submission)
Maybe I should rephrase the question. I'm looking for a script that runs on record creation that takes a field that will have at least one, but possibly more linked records, and writes them out to another table individually.
The final output would look like this
Table 1
Person 1: Events A,B,C
Person 2: Events B,D
Person 3: Event C
Table 2:
Person 1: Event A
Person 1: Event B
Person 1: Event C
Person 2: Event B
Person 2: Event D
Person 3: Event C