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

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (109,543)