Re: Using a form to remove a multiple-select option from a record

3706 2
Showing results for 
Search instead for 
Did you mean: 
6 - Interface Innovator
6 - Interface Innovator

I have a fairly complex set-up with Airtable automation and Integromat automation that does a whole bunch of stuff very nicely. I'll attempt a simple description of one part of it that is relevant to my request...

People can use a form to "watch" for changes in a record. Their email address is added as a multiple-select option to that record when they submit the form. The automation I've set up sends them an email when that record changes.

This all works fine but now I want to allow them to cancel this alert and I'm a bit stumped. My thinking is that they can use a second form which references the record and their email address and when it's submitted the automation will look up the record and remove the multiple-select option that matches the email address if it exists.

I just don't know how to do this. I'm assuming a script will be required and I'm not familiar with scripting myself.

Help? 😅

14 Replies 14

Oooh. Looks like it got a bit further but now we have this error:

TypeError: Invalid arguments passed to recordQueryResult.getRecord(recordId):
• recordId should be a string, not an array
at main on line 11


This is for me the fastest way to access the input variables.

I kept your names there, but actually you could also shorten it by renaming the input variables to recordToUpdate and emailToRemove and only us this:

const { recordToUpdate, emailToRemove } = input.config()


Your product_record is a linked field - there could be multiple products linked, so it is array of recordIs if you are sure it is only 1 , you could do this:

let recordToUpdate = product_record[0]

This will pick the first link from the array of records.

Amazing! That worked! Thanks so much... no way I would've worked that out myself. 😁

The form will autocomplete via a link in the alert emails that go out with the record ID and email address. I'l;l limit it to single select so people don't try to add more.

Onto the next stage of testing.

Thanks again. ❤️