cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Write Back Default Selected Item (People Picker) in SharePoint

Hi,

 

I am wondering why the "DefaultSelectedItem" value of my people picker field doesn't write back to the SharePoint list.

 

The default value that I used for GenManager field is coming from a list in Sharepoint. Please see image below...

 

KMagadia_1-1594107414370.png

 

Anyone here knows what I have missed?

 

I would appreciate any help. Thanks!

 

Regards,

-K

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @KMagadia ,

 

Please refer to this blog: Defining default values for complex SharePoint types in forms 

What should be put in 'DefaultSelectedItem' property in this case is the 'Claims' property of the person object, however, the Distinct function returns the Result of distinct DisplayName.

Please try to modify the 'DefaultSelectedItem' property as follows.

 

AddColumns(Filter('SP list',GenManager.Claims in Distinct(Filter('SP list', Department =DrpDept.Selected.Result),GenManager.Claims)),"Claims",GenManager.Claims,"DisplayName",GenManager.DisplayName)

 

Hope this helps.

Sik

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Hi @KMagadia ,

 

Please refer to this blog: Defining default values for complex SharePoint types in forms 

What should be put in 'DefaultSelectedItem' property in this case is the 'Claims' property of the person object, however, the Distinct function returns the Result of distinct DisplayName.

Please try to modify the 'DefaultSelectedItem' property as follows.

 

AddColumns(Filter('SP list',GenManager.Claims in Distinct(Filter('SP list', Department =DrpDept.Selected.Result),GenManager.Claims)),"Claims",GenManager.Claims,"DisplayName",GenManager.DisplayName)

 

Hope this helps.

Sik

View solution in original post

Highlighted

Hi @v-siky-msft,

 

Thank you for your response.

 

I did try to use that code and it now writes back the name into the list. Though the code appears to have a delegation warning but I would care less as the SharePoint list which I am looking at won't have large dataset.

 

Thank you!

 

Regards,

-K

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,048)