how to limit the number of additions to a group

Hi everyone, I have a question about limiting the number of additions to a group.

So, there is this option in my app where I can assign people to a group (here I'm assigning the student 35487 to the group "test") :

unknown.png

What I want to do is to limit to 5 the number of people I can add to a group : 

Screenshot_1.png

I'm sorry if a similar post has already been made, since I'm not an english speaker I don't seems to find a post with the same problem.

Thank you for your help.

Solved Solved
0 1 56
1 ACCEPTED SOLUTION

Hello @Jimmy_n0, you can solve that following these steps:

1- Create a virtual column in your "Equipe" table, let's call it "Team count", it should be of type number and should use an expression like this:

COUNT([Related MembreEquipe])

2- In your "MembreEquipe" table, go to your "NomEquipe" column configuration and enter this expression into the valid_if():

SELECT(Equipe[Equipe ID],[Team count]<5)

That should limit the dropdown to teams that still have room while also providing the dropdown itself.

OR

1'-Do it with a single step using a more robust expresion in that valid_if() I mentioned:

SELECT(Equipe[Equipe ID],COUNT([Related MembreEquipe])<5)

View solution in original post

1 REPLY 1

Hello @Jimmy_n0, you can solve that following these steps:

1- Create a virtual column in your "Equipe" table, let's call it "Team count", it should be of type number and should use an expression like this:

COUNT([Related MembreEquipe])

2- In your "MembreEquipe" table, go to your "NomEquipe" column configuration and enter this expression into the valid_if():

SELECT(Equipe[Equipe ID],[Team count]<5)

That should limit the dropdown to teams that still have room while also providing the dropdown itself.

OR

1'-Do it with a single step using a more robust expresion in that valid_if() I mentioned:

SELECT(Equipe[Equipe ID],COUNT([Related MembreEquipe])<5)

Top Labels in this Space