cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Oskarkuus
Post Prodigy
Post Prodigy

why does not person save to sharepoint list?

I have a sharepoint list called AAA

in this sharepoint list i have a column called PPL

PPL column is a Person column in sharepoint.

 

In powerapps i have a form based on my sharepoint list.

It automatically gives me a combobox for the person column.

 

Then i have a combobox i have created.

My own created combobox have this in Items.

'Office365-användare'.SearchUser({searchTerm:ComboBox2.SearchText;top:5})

 

This works fine. I can search all office365 users etc.

 

Now i want to set my own combobox selected items to populate the sharepoint column person combobox.

 

i have done this by adding this to the function defaultselection

ComboBox2.SelectedItems

 

combobox2 = my own created combobox with above office365 code in Items fucntion.

 

But when i save the form. The selected persons does not save to the list.

 

Why?

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @Oskarkuus ,

 

The office365user function returns a different column structure than the SharePoint Person column.

Person column of SharePoint is a embeded table contains "Claims", "Department", "DisplayName", "Email", "JobTitle", "Picture" columns.

Please modify the DefaultSelectedItems property:

 

{
Claims:"i:0#.f|membership|" & ComboBox2.Selected.Mail,
Department:"",
DisplayName: ComboBox2.Selected.DisplayName,
Email: "",
JobTitle:"",
Picture:""
}

 

For more reference: Defining default values for complex SharePoint types 

Hope this helps.

Sik

 

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @Oskarkuus ,

A person field is a "complex" field type and once you change the Items of the dropdown, you need to tell PowerApps what to send back. This can vary according to what you need to update. Please read this thread which should contain most of what you need.

This one is also useful as is this video from Shane Young @Shanescows 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

 

v-siky-msft
Community Support
Community Support

Hi @Oskarkuus ,

 

The office365user function returns a different column structure than the SharePoint Person column.

Person column of SharePoint is a embeded table contains "Claims", "Department", "DisplayName", "Email", "JobTitle", "Picture" columns.

Please modify the DefaultSelectedItems property:

 

{
Claims:"i:0#.f|membership|" & ComboBox2.Selected.Mail,
Department:"",
DisplayName: ComboBox2.Selected.DisplayName,
Email: "",
JobTitle:"",
Picture:""
}

 

For more reference: Defining default values for complex SharePoint types 

Hope this helps.

Sik

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,447)