Helpful tip on using intersect on default filters on new table (Filtering arrays)

Before sharing what I learned

The example

So I'm building a custom filter component for it to be more user-friendly and more granular and it works in tandem with the default filter section of the new table component. Although I hit a big wall with matching arrays with other arrays, to be more specific, when we are dealing with numbers.

It's a table that it's connected to two other tables, so a little bit complicated.

image

I had to make use of a lot of custom columns in order to get the expected results. I'm not sure if this is the best way, but now it works pretty smoothly.

What brought me here

I struggle finding information on the forums and in the documentation and I had a hard time formulating my issues to even start asking for help as I would make little steps in one direction just to go back again.

The problem, and the Solution I finally found

When working with multiselect fields and trying to find rows that can contain such values, intersects works only with strings for some reason. I took me quite a while to notice. since I moved on to tags, so when I moved back again to projects where I was in need to use Ids, I only transformed the values using .toString() in the places where it as needed.

I'm sharing just in case someone else stumbles into this problem in the future. Hope it's of some use to somebody.

5 Likes

Thank you so much for sharing, @Carlos_Ortiz Apologies that this wasn't better documented, but hopefully this can be a helpful resource for others now :pray: