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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,183)