Help

Filter by two criteria

1400 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Camp_SCMV
4 - Data Explorer
4 - Data Explorer

Hello,

How can we do, in a script, to apply a filter that returns records that match two conditions.

My attempts :

let filteredConcurrents = query.records.filter(concurrentEdition => {
return concurrentEdition.getCellValue('Edition Record Id')?.includes(editionAnumeroter.getCellValue('Record id'))
})

let filteredRecords = filteredConcurrents.records.filter(catego => {
return catego.getCellValue('categorie_texte')?.includes(categorie)
})

Thx for your help

3 Replies 3

Can you give a bit more info? Does you code run or not? If it runs, does it show the records you expect, too many, too few, or simply the wrong records? Can you share screen shots?

Thx for your answer.

There's an error.

The code in your first post does not exactly match the code in your screen shot. But they both have a similar issue. The second time you do the filtering you need to work with the previously filter array. The filtered array does not have a query object or a records object.

The new forum software does not let me type code properly on my phone, and won’t let me edit pasted code.

In this line, remove the ".records"

let filteredRecords = filteredConcurrents.records.filter(