Recently I was responding to the PowerApps forum and see the requirement and decided to write a blog about it. So what is that?
Requirement
Display Person names in a combo box. The source is Share Point and Multi-select person or group field. The requirement is to maintain the Person or Group Type which to keep all properties like (DisplayName, Email, Department, Claims, and Job Title).
SharePoint-MultiSelect-Person
Expected Output (Combo Box)
Display Distinct Person from this MultiPeople column from Sharepoint
Person column is always unique and Multi-Select involves more challenge with it. Initially, I thought just to ungroup it but Distinct and Sort won’t work until we do some tricks.
Combo Box
Set the items property of the Combo Box to
With({Items: Ungroup(ForAll(SPList,MultiplePeopleColumn),”Value”),
DistinctEmail:Distinct(Ungroup(ForAll(SPList,MultiplePeopleColumn),”Value”),Email)},
Sort(
ForAll(DistinctEmail,First(Filter(Items,Email=Result))),
DisplayName
)
)
References
Conclusion
We are able to display the Person or group in the combo box using With function and maintain the Person Type.