Help

Re: Filter a query using an object array

832 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Operaciones_Meg
4 - Data Explorer
4 - Data Explorer

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 record.id 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?
Captura de pantalla 2021-12-20 a las 9.47.01

1 Reply 1

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

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