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

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 @mimii ,

 

For single select:

 

Combobox card: 

- Update = comboboxPersons.Selected

View solution in original post

6 REPLIES 6
BCBuizer
Super User
Super User

Hi @mimii ,

 

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 

mimii
Helper I
Helper I

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 @mimii ,

 

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

mimii
Helper I
Helper I

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 @mimii ,

 

For single select:

 

Combobox card: 

- Update = comboboxPersons.Selected

mimii
Helper I
Helper I

@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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,443)