cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
landonjochim
Resolver I
Resolver I

Display all People from a People Picker field in List

For this post I will describe a much more basic example to what I am actually doing, but the concept is the same.

 

I have a SharePoint list with a People Picker column. You can select multiple people in this column.

 

I want to display all the people in a gallery

landonjochim_0-1641594255202.png

My gallery should contain any name that is in any List Item's "Employee" people picker field.

 

Thanks for any help.

1 REPLY 1
Alex_10
Super User
Super User

@landonjochim 

 

button.OnSelect = 
Clear(colDistinctPeopleFinal);
ForAll( Distinct(SP_list, Employee) As ThisMultiPeople,
    ForAll(ThisMultiPeople.Result As ThisPerson,
        If( !(ThisPerson in colDistinctPeopleFinal),
            Collect(colDistinctPeopleFinal, ThisPerson)
        )
    )
);

gallery.Items = SortByColumns(colDistinctPeopleFinal, "DisplayName", Ascending)

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,196)