Skip to main content

Hi.


Imagine that I have this:


let result = await table.selectRecordsAsync({fields: table.fields});


Navigating the API, I saw we can do this:


result.records.find(…)


but I cant’ fin any example. Can you explain how to use it?


Thanks in advance.

Hi @Guillermo_Ramos_Rui1,


so records.find() is simply using the Find() Javascript array method on the records array. Please read about find() here: Array.prototype.find() - JavaScript | MDN


Find requires a testing function inside and will give you the first array item that satisfied the function.


So something like: result.records.find(rec => rec.getCellValue("Name") === "Bob")


Reply