Power apps display grouping
About the Author: Manish Luhana
Microsoft business applications specialist and certified trainer.
Categories: Power Apps, Power Platform0 CommentsPublished On: 4 February 2022

I noticed the need when commenting to the PowerApps forum and decided to create a blog on it. So, what exactly is it?

share-point-power-apps

Requirement

In a combo box, display the names of people. Share Point and the Multi-select person or group field are the sources. The criteria is to keep the Person or Group Type and all of its properties (DisplayName, Email, Department, Claims, and Job Title).

SharePoint-Multi Select-Person

multiselect-person

Expected Results (Combo Box)

Display Distinct Person from Share point’s Multi people column

expected-output-combo-box

Person column is always unique, and multi-Select adds to the difficulty. I was going to just ungroup it, but Distinct and Sort aren’t going to help us unless 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

references

Conclusion

We are able to display the Person or group in the combo box using With function and maintain the Person Type.

tech mentor sidebanner
  • Continue reading
  • Continue reading
  • Continue reading
  • Continue reading
  • Continue reading

Leave A Comment