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

Use multi-people-picker column to create power apps collection

Hi,

 

Use case:

Users need to select from a list of specific VPs of my company for an approval of a form they submit via PowerApps

 

Solution:

  • Created a SP-List to manage the VPs in a multi-people-picker column for Form ID=9 (multiple forms have this same use case)
  • Collect all VPs from ID=9 AND in the VP people picker column, and add them to a collection in Power Apps.

Issue:

I am able to collect the information I need, but it throws it into a nested table. How do I unnest this table so I can use it in a Gallery so users can select a VP?

Code in the App.OnStart Field:

Schwartz_Cory_2-1670344954210.png

 

 

 

Collection:

(why is there a VicePresidents table inside this collection? why isnt the "ApprovingVPs" collection THAT table?)

Schwartz_Cory_1-1670344801966.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Found a solution!

 

You need to create another collection based off the initial collection

See code screenshot below: (using "Managers" Instead of "VPs" now).

The 1st clearcollect function is getting the SP-List People Picker Column from ID#9.

The 2nd Collect function is just creating a seperate collection based off the nested collection. (This allows me to use it in a Gallery as the nested collection does not work)

Schwartz_Cory_0-1670350938615.png

 

(more screenshots below)

 

1st Collection

Schwartz_Cory_1-1670351105997.png

2nd collection (what i needed this whole time for my Gallery) (drew over it to protect identity)

Schwartz_Cory_2-1670351365521.png

 

 

View solution in original post

5 REPLIES 5
SebS
Memorable Member
Memorable Member

@Schwartz_Cory 

 

You can't un nest it Person and Group column is a complex type and the Person picked is a table containing information like Name, Department, Role, Email and more. 

 

To get only names You should run ForAll and point to DisplayName what will then collect only names from all Picked People in the Picker

 

 


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

Hi @SebS ,

I would like all columns in the multi-people picker table, but I definitely need the Name, Email, Picture.

How can I use the ForAll function to get those 3 into a Single-level collection (no nested collections)?

Found a solution!

 

You need to create another collection based off the initial collection

See code screenshot below: (using "Managers" Instead of "VPs" now).

The 1st clearcollect function is getting the SP-List People Picker Column from ID#9.

The 2nd Collect function is just creating a seperate collection based off the nested collection. (This allows me to use it in a Gallery as the nested collection does not work)

Schwartz_Cory_0-1670350938615.png

 

(more screenshots below)

 

1st Collection

Schwartz_Cory_1-1670351105997.png

2nd collection (what i needed this whole time for my Gallery) (drew over it to protect identity)

Schwartz_Cory_2-1670351365521.png

 

 

@Schwartz_Cory 

 

Nice Well done 🙂


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

Also, I am able to make this more efficient and remove Collection1 by replacing it with my Filter(SP-List) function:

 

Schwartz_Cory_3-1670351613424.png

 

So now I dont have 2 collections and only the 1 I need!

 

 

 

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 (5,002)