Slice based on the comparison of two reference Enumlists.

I have the following databases:

  1. Tasks
  2. Companies
  3. Users and roles
  4. Projects and events

What I aim to achieve is that a user, with different companies assigned, can only see tasks and [projects/events] from the companies they are assigned to. (In the tasks section, the corresponding [project/events] is specified and takes the data from [Companies], and automatically (Lookup), the companies assigned to the [project/events] are populated.)

In the “slice,” I am using the following formula: IN( LOOKUP( USEREMAIL(), “03. Users and roles”, “Email”, “Companies” ), [Companies] ) )

The issue is that when searching for the company (USEREMAIL–>Email–>Company), it results in the ID of the assigned companies, and in [Companies], it provides the names. So it always result in “False”.