cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Saving selected value to SharePoint list

Hello everyone, 

 

I need some help to save my value to my Sharepoint list. Actually I can display the fields that I want to show into the combobox where only one of them can be selected. I made also a collection to verify if the selected name is in the collection and this works fine. The problem that I have is that it doesn't saves into my Sharepoint list. I don't know what i'm missing.

 

Combobox card: 

- Update = {Person: comboboxPersons.Selected.DisplayName}

Combobox: 

- Items = colPersonNameChoices.DisplayName // to show the whole name list 

Button 

- OnSelect = Submit(form)

 

I tried on the OnSelect this code but it gives me errors: 

Patch(

    SharePointList; Default(SharePointList);

    {

     Title: globalvariable;

     Pers; comboboxPersons.Selected

   })

 

Can someone help me? 

1 ACCEPTED SOLUTION

Accepted Solutions
BCBuizer
Super User
Super User

Hi @Anonymous ,

 

For single select:

 

Combobox card: 

- Update = comboboxPersons.Selected



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

6 REPLIES 6
BCBuizer
Super User
Super User

Hi @Anonymous ,

 

I'm assuming the column type of 'Pers' is a Person/Group, which is causing the issue, because you are sending a Text type (DisplayName).

 

I think removing the selector from your code will fix the issue:

 

Combobox card: 

- Update = {Person: comboboxPersons.Selected}

Combobox: 

- Items = colPersonNameChoices// to show the whole name list 



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.
Anonymous
Not applicable

Hi @BCBuizer

 

Thanks for your reply ! 

 

This is exact pers is a Person/Group in SharePoint. I just changed my code, but when I'm sending my form I still have an empty field in my SharePoint list. Do you have any idea how I can fix that? 

BCBuizer
Super User
Super User

Hi @Anonymous ,

 

I assume your errors have disappeared? Is the 'Pers' column a MultiSelect column by any chance? In that case you need:

 

Combobox card: 

- Update = comboboxPersons.SelectedItems



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.
Anonymous
Not applicable

Hi @BCBuizer

 

I don't have a multiSelect Column. I changed it to multiSelect Column to test the code. There is no error but I still have nothing stored under Pers column in the sharepoint list

BCBuizer
Super User
Super User

Hi @Anonymous ,

 

For single select:

 

Combobox card: 

- Update = comboboxPersons.Selected



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.
Anonymous
Not applicable

@BCBuizer 

 

When I tried this code it doesn't worked, but then I decided to delete the card and add it again in my form. 

Now everything works fine! 

 

Thank you for that ! 🙂 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

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