Expression I need help this is pretty urgent

Hello I have 2 tables :

Team 1 ------ N Users

In team one attribute : Name like “Team a”
In users I have two attributes : Email and TeamName(ref to table team)
I wanna do a show the row in team if
If USEREMAIL() exists in Users.email show the Team in the view team

like this just some sql mixed with appsheet may be more understandful →
SHOW Name
FROM team, users
where Users.email = USEREMAIL()
and Team.name = Users.teamName;
I just really don’t understand how to do it…
If anyone has a solution.
Thanks everyone

Solved Solved
0 4 334
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Try this:

IN(
  [Team].[name],
  SELECT(
    Users[teamName],
    ([email] = USEREMAIL())
  )
)

View solution in original post

4 REPLIES 4

“showif” is not applicable in this situation. You should be looking at Slices or Security Filters

I’m trying to create a Slice using the row filter condition but I don’t find the expression that do what I want, Can you help me finding it ?

I tried AND(CONTAINS(Users[Email], USEREMAIL()), CONTAINS(Users[Nom_Equipe], [Nom_Equipe]))

But all those statements are true haha… I miss something but I don’t know what

Also I have another table called animals and another one called group of animals, those animals have this relation with team

Users 1----N Team 1 ----- N group of Animals 1 ------ N animals

My users can add Animals in their team and in their group of animals contained inside the team but I have a problem, When they edit the animal to change things, they can change the attribute group of animal of the animal, so they can by this way add animals in groups of other team and they don’t have the right to but I don’t know how to counter that ?
Please help me.
Thanks

Steve
Platinum 4
Platinum 4

Try this:

IN(
  [Team].[name],
  SELECT(
    Users[teamName],
    ([email] = USEREMAIL())
  )
)
Top Labels in this Space