Help

Error sciprt vlookup

Topic Labels: Scripting extentions
511 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Sof_Hammami
4 - Data Explorer
4 - Data Explorer

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