Help

Re: Need help with a LookUp script function

480 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Alex_Demas
4 - Data Explorer
4 - Data Explorer

Hello everyone,

Although I am not new to Airtable, scripting/ coding is not something I am familiar with and I would like to ask if anyone can help with a script I set up below.

Now that Airtable allows for sync bases, I finally have to opportunity to combine multiple bases in one and look up all records from one source instead of having to click at a million things.

That said, since I have 8 active bases (the reason being that we are using Airtable to in order to Telemarket/ Telefundraise) I also have 8 synced tables - with multiple columns each - that are still kind of tedious to go through.

I found this script from one of the Airtbale members that allows for a lookup function

image

Now my question is:

Is there a way for the if statement to update multiple records and if so how would that script look like?

e.g if “Name” === the lookupValue then

let returnValue = rangeRecord.getCellValue(“Attempt Counts”);
let returnValue = rangeRecord.getCellValue(“Column 1”); etc.

and update the main table.

-Also if that is too tricky, then I am also fine that if Name = lookupvalue,

update all other columns that match.

since all I am trying to do is to merge 8 tables in one therefore all columns are identical.

As I said I have zero knowledge of scripting so any help would be greatly appreciated. Thank you in advance!

-Alex

1 Reply 1

It isn’t clear how you want the script to interact with the synced tables. You cannot edit synced data in the receiving table. The data can only be updated in the original source table. A script in a receiving table cannot directly update a record in a different table (at least not without pretty involved workarounds).

That said, it is possible for a script to update multiple records in the same base, as long as the user running the script has the permissions to update those records. There are many ways to do this in code–the exact implementation would depend on the setup of the records to update.