# DataTable rowThreshold in array

**URL:** <https://community.dynatrace.com/t/datatable-rowthreshold-in-array/41333>\
**Category:** Developer Q&A Forum\
**Tags:** strato\
**Created:** [August 23, 2023, 7:18pm UTC](https://community.dynatrace.com/t/datatable-rowthreshold-in-array/41333 "2023-08-23T19:18:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucas\_hocker](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/lucas_hocker/32/29551_2.png) [@lucas\_hocker](https://community.dynatrace.com/u/lucas_hocker)\
**Post date:** [August 23, 2023, 7:18pm UTC](https://community.dynatrace.com/t/datatable-rowthreshold-in-array/41333/1 "2023-08-23T19:18:12Z")

</div>

I have two arrays, `haystack` and `needles` and I’d like to use DataTable rowThresholds to highlight the rows of `haystack` that are also in `needles`. I don’t see a straight-forward way of doing this with the available comparators. Do I need to create a new field in `haystack` based on the in comparison between arrays?

---

<div class="post-metadata">

**Author:** ![imsingh](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/imsingh/32/7858_2.png) [@imsingh](https://community.dynatrace.com/u/imsingh)\
**Post date:** [August 28, 2023, 8:19pm UTC](https://community.dynatrace.com/t/datatable-rowthreshold-in-array/41333/2 "2023-08-28T20:19:57Z")

</div>

Hi Lukas,

You’re correct that using rowThresholds to highlight a row using custom logic isn’t possible. I think easiest way to achieve what you want is exactly what you mentioned, “Create a new field in haystack” and store a boolean value in it.

Also, since the available comparators only work with number or string. You actually have to convert boolean to strings and store “true” or “false” and use it in the comparison as following:

```markup
<DataTable
        columns={sampleColumns}
        data={sampleData}
        fullWidth
        rowThresholds={[
          {
            id: "inHeystack",
            value: "true",
            comparator: "equal-to",
            color: Colors.Charts.Loglevel.Critical.Default,
          },
        ]}
      />

```

I’ll dig deeper and let you know if I find more details.
