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

Welcome to the User Group Public Preview

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

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (77,531)