web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / DefaultSelectedItems p...
Power Apps
Answered

DefaultSelectedItems people picker that looks up a SharePoint column

(0) ShareShare
ReportReport
Posted on by 93

Hi everyone,

 

I am trying to default multiple people to a people picker but am struggling. At the moment the code to default is as follows,

 

With(
            {
                wRecord: LookUp(
                    'Look-up Roles',
                    Title = "Project Manager Entity"
                )
            },
            Switch(
                cb_LegalEntity.Selected.Title,
                "Entity 1",
                wRecord.'Entity 1',
                "Entity 2",
                wRecord.'Entity 2',
                "Entity 3",
                wRecord.'Entity 3',
                "Entity 4",
                wRecord.'Entity 4',
                "Entity 5",
                wRecord.'Entity 5',
                "Entity 6",
                wRecord.'Entity 6',
                "Entity 7",
                wRecord.'Entity 7',
                "Entity 8",
                wRecord.'Entity 8',
                "Entity 9",
                wRecord.'Entity 9'
            )
        )
 
The column is dynamic which is why it is more complex. Does anyone have an idea on how to change it to all multiple people?
 
TIA
Categories:
I have the same question (0)
  • Verified answer
    anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    hi @NicolleAbraham ,

    To default multiple people in a People Picker in PowerApps, you need to modify your formula to handle collections of people instead of single person references.

    With(
     {
     wRecord: LookUp(
     'Look-up Roles',
     Title = "Project Manager Entity"
     ),
     defaultPeople: Switch(
     cb_LegalEntity.Selected.Title,
     "Entity 1",
     wRecord.'Entity 1',
     "Entity 2",
     wRecord.'Entity 2',
     "Entity 3",
     wRecord.'Entity 3',
     "Entity 4",
     wRecord.'Entity 4',
     "Entity 5",
     wRecord.'Entity 5',
     "Entity 6",
     wRecord.'Entity 6',
     "Entity 7",
     wRecord.'Entity 7',
     "Entity 8",
     wRecord.'Entity 8',
     "Entity 9",
     wRecord.'Entity 9'
     )
     },
     ForAll(
     Split(defaultPeople, ";"),
     {
     Claims: "i:0#.f|membership|" & Trim(Value),
     DisplayName: Trim(Value),
     Email: Trim(Value)
     }
     )
    )

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

#2
11manish Profile Picture

11manish 224

#3
Valantis Profile Picture

Valantis 181

Last 30 days Overall leaderboard