Hey crew!

I've been wrestling with a problem the past few hours and have decided it is time to ask for help.

My airtable database is setup with players and parents tables. Players can be associated with multiple parent records, and parents can be associated with multiple player records.

I have created a zap that distributes the data from a form to my airtable database. The form asks if the person filling out the form is a player or a parent. That info is then used to filter the zap. If they are a player, the zap will only add/update a player record. If they are a parent, the zap will add/update a parent record, and then add/update a player record.

So I've turned on my zap, everything seems hunky dory, I'm sucking back on a few beers feeling good about myself as I do my 'final tests'. Much to my misery, I find out that I cracked open the six-pack a moment too soon.

If a parent already exists in the database and is already linked to a player, when I add a new player through the form who is also linked to that same parent (think a sibling of the existing player), it works successfully and the parent record now shows it being linked to 2 player records.

However, if a player exists and is already linked to a parent, and then I add a new parent who links to an existing player, it takes the existing link between the player and existing parent and destroys it in what I imagine is a fiery, painful death.
It then updates the link for the player to parent to only show the link to the newly arrived parent.

I want the new parent form submission to show to be linked to the player, but not remove the existing link to another parent.

I've tried to make sense of each of these two solutions, but I can't quite make sense of it.Β 
Zap answer - "create a rec() function in the table and use a function to find the matching case and then pick the ID and link it"
Airtable - "make another table of all interaction and link that"Β 

If anyone has the time to help me figure this out, I would be hugely appreciative. Thanks!

Back at it, and figured it out. Here is the solution -

My zap initially was 1. Add parent 2. add player, 3.find player, 4.Β  update player with parent link
I changed it to 1. Add player, 2. Add parent, 3. find player, 4. update player (and then I also submitted a parent example as my test data that had all the relevant fields already completed).

I think that updating the test data allowed me to find the existing links in the parent fields in the 3rd step (find player) and add that information to the 4th step so I am re-adding the info that already exists and also adding the new parent link. I also separated the fields with a comma and everything works great now.

Thanks again!

Post a comment

Log in