cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kadd
Resolver III
Resolver III

Removing users from a multi-value people picker column

Hello, hello everyone,

 

me again !!! Hope you're doing great.

New issue, I hope someone will be able to help me again 😛

 

I have a list called "Groups" in this list i have a field "GoupName" where each line contains the name of a group and a corresponding column "Users"... which is a multivalue people picker.

 

I created a form where i add people to my groups...which works perfectly ....but i'm also trying to remove the users from the different groups...and this is the problem.

 

I need to go through all the groups and deleted the selected users.

 

Is there an understandable (by me 🙂 ) easy way to do this ?

 

Thanks a lot in advance for your help !!

 

Regards

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Kadd :

Could you tell me:

  • Do you want to delete a certain user in the "GoupName" field in bulk?
  • Does the "GoupName" field allow multiple selections?

I assume the above assumption holds:

I've made a test for your reference:

My data source(List A):

Employee-Person or group/allow mutiple selections

1_LI (2).jpg

1\Add a combo box(ComboBox2)

Items:

 

Choices('List A'.Employee)

 

SelectMultiple:

 

false

 

2\Add a button:

OnSelect:

 

Clear(Thevar);/*Thevar is my custom collection*/
ForAll(
    RenameColumns(
        'List A',
        "ID",
        "IDD"
    ),  /*Renamed ID column to IDD to eliminate ambiguity*/
    Collect(
        Thevar,
        {
            IDD: IDD,
            subtable: Filter(
                LookUp(
                    'List A',
                    ID = IDD
                ).Employee,
                !(Claims = ComboBox2.Selected.Claims)
            )
        }
    )
);/*Collect the ID column and Employee column in the data source (filter the data in the Employee column to delete the target user)*/
ForAll(
    Thevar,
    Patch(
        'List A',
        LookUp(
            'List A',
            ID = IDD
        ),
        {Employee: subtable}
    )
)/*Update the data source with data from Thevar*/

 

2.JPG

 3_LI.jpg

Best Regards,

Bof

View solution in original post

7 REPLIES 7
JayMagness
Solution Specialist
Solution Specialist

HI,

Firstif you send me an email I will setup a teams session Jay@research-nest.com.

 

There are a few ways to do everything and if we get on line in teams we can talk about the best options

v-bofeng-msft
Community Support
Community Support

Hi @Kadd :

Could you tell me:

  • Do you want to delete a certain user in the "GoupName" field in bulk?
  • Does the "GoupName" field allow multiple selections?

I assume the above assumption holds:

I've made a test for your reference:

My data source(List A):

Employee-Person or group/allow mutiple selections

1_LI (2).jpg

1\Add a combo box(ComboBox2)

Items:

 

Choices('List A'.Employee)

 

SelectMultiple:

 

false

 

2\Add a button:

OnSelect:

 

Clear(Thevar);/*Thevar is my custom collection*/
ForAll(
    RenameColumns(
        'List A',
        "ID",
        "IDD"
    ),  /*Renamed ID column to IDD to eliminate ambiguity*/
    Collect(
        Thevar,
        {
            IDD: IDD,
            subtable: Filter(
                LookUp(
                    'List A',
                    ID = IDD
                ).Employee,
                !(Claims = ComboBox2.Selected.Claims)
            )
        }
    )
);/*Collect the ID column and Employee column in the data source (filter the data in the Employee column to delete the target user)*/
ForAll(
    Thevar,
    Patch(
        'List A',
        LookUp(
            'List A',
            ID = IDD
        ),
        {Employee: subtable}
    )
)/*Update the data source with data from Thevar*/

 

2.JPG

 3_LI.jpg

Best Regards,

Bof

@v-bofeng-msft ,

 

Thanks a lot for your answer.

 

I want to delete a specific user (Column Users which is a people picker multi value)  in all the groups (column GroupName  which is a text column).

 

I reproduced what you wrote but the problem seems to be that the combobox that i liked to my "Users" column doesn't load the users i have in my column.

 

hmm...

 

Thanks a  lot

 

Regards

Hi @Kadd :

Yes, it will not be displayed. You need to search manually.

16.gif

Best Regards,

Bof

Hi @v-bofeng-msft ,

 

yes, i understand what you mean but the combobox won't let me type anything, it shows up like a simple dropdown ...that is empty.

 

2020-06-19 10_09_07-BIAv2 - Groups - All Items.png

Hi @Kadd :

Please set this combo box's IsSearchable property to :

 

true

 

Best Regards,

Bof

@v-bofeng-msft ,

 

Ah yes !!! of course 😛

 

It works now, thanks a lot for your help !! 🙂

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,563)