Filter by User Category

Hello,

I have a database with the following structure:

  • Categories
  • Leads.categories
  • Companies.categories

Each Lead belongs to a category, and Companies should only see Leads in their desired categories.

In my CRM app, I have two Data Sources:

  1. The first one retrieves Companies:

  1. The second one is meant to match Leads.categories with Companies.categories:

The Problem

  • If I use the condition Categories -> Contains, no data is returned.
  • If I use Categories -> Has, it returns all leads, not filtered by company categories.

My Question

How can I store Companies.categories in session data and then use it to filter leads based on that?

Could you try to use the id instead of the value in the filter and use the operator has ?