cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sworek
New Member

Displaying a Multiple Selection Person Field in a Gallery

I have an SPO list with several records (Nominations), and each record contains a Person field (Nominees) that allows multiple selections. In the app, I'm showing a single Nomination based on a selection from the previous gallery (Gallery1) and I would like to show the Nominees in a separate gallery, with one entry for each Nominee. I've managed to create a gallery that shows ALL nominees, but I'm having trouble figuring out how to get it to only show the nominees from the selected record. I've tried using Filter and LookUp functions, but I'm not sure where to place them. None of my trial and error has panned out, so I figure it's time to ask for help! Below is the current code that returns a gallery of all Nominees.

With(
{Items: Ungroup(ForAll
('AoE-Nominations',Nominees),"Value"),
DistinctEmail:Distinct(Ungroup(ForAll('AoE-Nominations',Nominees),"Value"),Email)},
Sort(
ForAll(DistinctEmail,First(Filter(Items,Email=Result))),
DisplayName
)
)

3 REPLIES 3
BCBuizer
Super User
Super User

Hi @Sworek ,

 

Have you tried:

 

Gallery2.Items = Gallery1.Selected.Nominees

 

?

 

This should return a table (since the Nominees column allows for multiple selection) that has all the Nominees in it for the selected Nomination in Gallery1.



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Hi @BCBuizer ,

 

I had not tried that! It doesn't seem to work, however. Gallery1 uses PowerBIIntegration as it's data source, so I've had to use lookup to set the item for the Nomination. I assume I would need to do something similar for the items for the Nominees gallery. 

Sworek
New Member

Thanks for your suggestion @BCBuizer! I went to basics (I knew it shouldn't be this complicated) and this formula worked: 

LookUp('AoE-Nominations',ID = Value(Gallery1.Selected.ID),Nominees)

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,523)