So I have a Gallery with Items. One of the Columns called Owners is a Multi-Choice People field.
I created a dropdown above the Gallery that has a list of Owners.
When I select the Owner(s) in the dropdown, I need to filter the list in the gallery to only display the results for that Owner(s).
I see an example here posted which I slightly modified to work with a People field.
https://powerusers.microsoft.com/t5/Power-Apps-Community-Blog/Many-on-Many-Filter/ba-p/789211
However, I'm not able to filter the Gallery using the method in the above post./
What would be the equivalent of that method for a multi-choice People field?
For the dropdown combobox:
Clear(colAllPersons1);
ForAll(SPList As Source,Collect(colAllPersons1, {PersonInfo: Source.Owners} ));
Clear(colAllPersons2);ForAll(colAllPersons1 As Source,Collect(colAllPersons2,Source.PersonInfo));
ClearCollect(colAllPersons3,Distinct(colAllPersons2,Email));
Clear(colAllPersons4);ForAll(colAllPersons3,Collect(colAllPersons4,First(Filter(colAllPersons2,Email=Result))));
ClearCollect(colAllPersons5,Sort(colAllPersons4,DisplayName));
For the Items in the Gallery:
Sort(
GroupBy(
AddColumns(
colMyChoices,
"MCT",
With(
{
wMCT:
Concat(
MultiChoiceTest,
Value & ", "
)
},
Left(
wMCT,
Len(wMCT) - 2
)
)
),
"ID",
"MCT",
"OtherData"
),
ID
)