Configure row color dynamically issue

Hello all!

I am trying to configure a row color dynamically with javascript condition where the row is highlighted red if the value of the current row matches any result from a query that response has a list of values. I am having a tough time doing that and I would appreciate any guidance.

{{ currentRow.employeeNumber == {{query6.data.employeeNumber['i']}} ? 'red' : 'clear' }}

Thanks,

@Miotx Hard to say without seeing some screenshots and what the conditions are. Also, just at first glance remove the single quote from ['i']...

To match against any result in an array of data you probably want to use includes
eg
{{ query6.data.includes(currentRow.employeeNumber) ? 'red' : 'blue'}}

2 Likes

Perfect! Worked like a charm.

Thank you very much!