Filter a query using an object array

Hi, I’m struggling with this script (I’m a newbie) you see below. I have the array “dependencyOrderSplit” which, can have more than 1 string object. I should use these strings to filter thru “let filteredRecords = queryResult.records.filter” and comparing the string field “order” with ALL the objects [0, 1, 2, etc.] and retrieve the which comply with that. My problem is I don’t know how to obtain a new array with ALL the filtered records. If I use [0] as in the example, only object 0 is retrieved, but object 1 not. Any ideas?

you should check it vice versa, if array includes element,

return dependencyOderSplit.includes(dependent.getCellValueAsString(‘Order’))

1 Like

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.