cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AlexBM
Frequent Visitor

Autofilled person not saving in Sharepoint list

Hi there.

I'm developing a PowerApps form where some person fields are auto filled depending on the user opening said form: one it's the user who opens the form itself and the other it's their manager. On the form it works as expected, it takes the right person and shows it like it if I had open the drop down and select the person manually, but when I save it, those person fields are blank. The thing is that, if I delete that auto filled user on the form, open the drop down and select that exact same user and save, it works, so I believe the problem resides on PowerApps, but I don't know where.

 

I did the manager field by creating a data card using the default adding fields property of my form with the data origin, then on the data card, on the 'DefaultSelectedItems' field I wrote "Office365Users.Manager(User().Email)"

 

Thank you for your time,

 

Alex

1 ACCEPTED SOLUTION

Accepted Solutions
v-albai-msft
Community Support
Community Support

Hi @AlexBM ,

This is because that SharePoint "person and group" column does not store the data as the way user profiles are stored in Office365 Users connection.

For using the matched format when configure the DefaultSelectedItems property of person column, you can try this formula:

 

{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
   Claims:Concatenate("i:0#.f|membership|",Office365Users.Manager(User().Email).Mail),
   DisplayName:Office365Users.Manager(User().Email).DisplayName
}

 

v-albai-msft_0-1620266601045.png

Best regards,

Allen

View solution in original post

1 REPLY 1
v-albai-msft
Community Support
Community Support

Hi @AlexBM ,

This is because that SharePoint "person and group" column does not store the data as the way user profiles are stored in Office365 Users connection.

For using the matched format when configure the DefaultSelectedItems property of person column, you can try this formula:

 

{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
   Claims:Concatenate("i:0#.f|membership|",Office365Users.Manager(User().Email).Mail),
   DisplayName:Office365Users.Manager(User().Email).DisplayName
}

 

v-albai-msft_0-1620266601045.png

Best regards,

Allen

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,726)