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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard