cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KMagadia
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
v-siky-msft
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
v-siky-msft
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

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,265)