I’m working with a dataset where a user has permission to access multiple accounts, and an account can be accessed by multiple users (there is a many-to-many relationship between users and accounts). I’m importing this dataset into Airtable as a CSV file via a script that does two things:
If an account in the dataset does not already have a record in the Accounts table in Airtable, it creates one
If an account in the dataset already has a record in the Accounts table in Airtable, but the User field (a linked record field that allows linking to multiple records) does not contain a link to a linked record for a specific user (set in a variable elsewhere in the script), then it adds that user to the User field
The issue that I’m running into is that after doing a lot of searching I’m not sure how to correctly write the following actions into my script:
Filter records on the Accounts table where the User field (a linked record field that allows linking to multiple records) contains a specific linked record
Add the linked record for the specific user to the User field on the Accounts table without overwriting the linked records for other users that are already linked in this field
If someone can point me in the right direction here, it would really help me out a lot.
Thanks in advance!