Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Error sciprt vlookup

Topic Labels: Scripting extentions
233 0
cancel
Showing results for 
Search instead for 
Did you mean: 

N: Can’t set cell values: invalid cell value for field ‘famille’.
Cell value has invalid format: must be a string

this is my script

//Replace “Code cable” with column name which has the values you want to look up

for (let record of mainTableRecords.records) {

 let lookupValue = record.getCellValue("Code cable");

//Replace "Name" with column name which is the range to search in

//Replace "Famille" with columnn name which value should be returned

for (let rangeRecord of lookupRangeRecords.records) {

    if (rangeRecord.getCellValue("Name") === lookupValue) {

        let returnValue = rangeRecord.getCellValue("Famille");

        //Replace "famille" with column name from mainTable which should contain the link

        await mainTable.updateRecordAsync(record, {"famille":returnValue

        });

     }           

}

}

0 Replies 0