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



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



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.
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



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.
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



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.
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
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (4,066)