Discuss anything related to web development but no technical support questions


Post by lxxrxns »

Hi there!

I have summaries that show several numbers based on certain filters, very much like this example:

https://www.bryntum.com/products/scheduler/examples/multisummary/

But I would like to know how to filter on 2 or more conditions.

I tried sequential filtering:

label    : 'High rating',
renderer : ({ events }) => events.filter(event => event.name == "Produce").filter(event => event.resource.rating > 4).length || 0

But this doesn't work.

How can I filter on multiple conditions? I.e. an event-related condition ánd a resource-related condition.

Thanks for all the help!

Laurens


Post by tasnim »

Hi,

Thanks for reaching out.

You can try this instead

events.filter(event => event.name == "Produce" && event.resource.rating > 4).length || 0

Does that help?

Best regards,
Tasnim

How to ask for help? Please read our Support Policy


Post by lxxrxns »

Yup! It's working great! Thanks so much!


Post Reply