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 / SharePoint People Colu...
Power Apps
Answered

SharePoint People Column, Form Default Selected Items For Manager

(0) ShareShare
ReportReport
Posted on by 26

Hi all,

 

I'm having an issue with Power Apps, and any help I can get is greatly appreciated. I've tried researching it, including on this site, but nothing has worked so far.

 

I have a form, and for one of the data cards in the form, I'd like it to autopopulate the manager of the user, and then when the form is submitted, send this information to the people column of a SharePoint list.

 

I have this in the App OnStart:

 

Set(_myuserprofile,Office365Users.MyProfile());

Set(_chosenmanager, Office365Users.Manager(_myuserprofile.Id));

Set(_chosenmanagerPhoto, If(Office365Users.UserPhotoMetadata(_chosenmanager.Id).HasPhoto, Office365Users.UserPhoto(_chosenmanager.Id)))

 

I originally just had _chosenmanager in the default selected items, and that displayed the name of the manager in the form, but didn't send the information through to the SharePoint list.

 

Then, after some research, I tried:

If(FormLeaveRequest.Mode=FormMode.New, _chosenmanager, _chosenmanager)

and

If(FormLeaveRequest.Mode=FormMode.New, _chosenmanager, Parent.Default)

but had the same result, in that it displayed the correct name, but didn't feed the information to the SharePoint list when I submitted the form.

 

I did some more research, and tried

If(FormLeaveRequest.Mode=FormMode.New, {DisplayName: _chosenmanager.UserPrincipalName, Claims: "i0#.f|membership|" & _chosenmanager.Mail},Parent.Default)

and I also tried

If(FormLeaveRequest.Mode=FormMode.New, {DisplayName: _chosenmanager.DisplayName, Claims: "i0#.f|membership|" & _chosenmanager.Mail},Parent.Default)

 

But both of these don't even let me submit the form, even though it displays the correct email address, an error message just appears instead, saying 'The requested operation is invalid. Server response : SharePointListName failed: The specified user i0#.f|membership|Managername@company.com could not be found.' (It's definitely connected to Office365Users).

 

If it helps, this is what's in Update for the data card:

 

Manager_DataCardValue.Selected

 

Any solutions or work-arounds would be amazing.

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Charlotte17 ,

     

    It's i:0#.f|membership| not i0#.f|membership| .

     

    If(FormLeaveRequest.Mode=FormMode.New, {DisplayName: "", Claims: "i:0#.f|membership|" & _chosenmanager.Mail,JobTitle:"",Picture:"",Department:"",Email:""},Parent.Default)

     

    Best Regards,

    Wearsky

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard