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
Solved! Go to Solution.
Hi @Kadd :
Could you tell me:
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\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*/
Best Regards,
Bof
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
Hi @Kadd :
Could you tell me:
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\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*/
Best Regards,
Bof
H @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 @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.
User | Count |
---|---|
254 | |
106 | |
92 | |
47 | |
37 |