web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patching Mutli select ...
Power Apps
Unanswered

Patching Mutli select Checkbox into a Sharepoint list

(0) ShareShare
ReportReport
Posted on by

I have choice column in my SharePoint list , In my PowerApps form I have added a gallery in inside the DataCard and added Multiselect checkbox for the values, 

Onsubmit of my form I want to patch these values into my SharePoint list , I've tried following formulas but its not working 

Could anyone please help me to fix it 

Patch(Risk_Database, ThisItem,{'Risk Assessment Confirmed':Gallery1.Selected.Values})

Categories:
I have the same question (0)
  • v-yueyun-msft Profile Picture
    on at

    Hi , @Danny_Dicaprio 

    You can try to use this code :

     

     

    Patch(Risk_Database, ThisItem,{'Risk Assessment Confirmed':{Value:Gallery1.Selected.Values} })

    And what is your Gallery1.Selected.Values in your side?

    If the column is multiple choices columns , you need to pass this format table :

    vyueyunmsft_0-1701667678032.png

     

     

    For more information, you can refer to :
    Power Apps Patch function with SharePoint - Reza's Blog (rezadorrani.com)

     

     

    Best Regards,

    Yueyun Zhang

  • Danny_Dicaprio Profile Picture
    on at

    Hi it is showing some error 

     

    Iam trying to pass these code in onslect of my submit button 

    Danny_Dicaprio_0-1701667619493.png

     

    Danny_Dicaprio_1-1701667710601.png

     

  • v-yueyun-msft Profile Picture
    on at

    Hi , @Danny_Dicaprio 

    If you use the check Box in Gallery you can try to configure like this. I test it in my side .

    CheckBox -OnCheck : Collect(varChoices , ThisItem)

    CheckBox- OnUncheck: Remove(varChoices , ThisItem)

     

    Button-OnSelect:
    Patch(ChoicesTest , Gallery1.Selected ,{MulChoices: varChoices}); Clear(varChoices);

     

    vyueyunmsft_0-1701669010198.png

     

     

    If I misunderstand what you mean, you can describe your needs and your expected outcomes in detail so that we can better help you.


    Best Regards,

    Yueyun Zhang

     

     

  • Danny_Dicaprio Profile Picture
    on at

    @v-yueyun-msft 

     Hi, still the error is showing 

    Let me detail the issue:

    I have a choice column in sharepoint list , In my powerapp I've added a gallery Inside the datacard and added checkbox to display the choice values  ( The purpose is to display a multiselect checkbox )

    Checkbox property    Default: False                     Text:Thisitem.Value

    Gallery Items    : Choices([@Risk_Database].'Risk Assessment Confirmed')

    On select of my submit button, I want to patch the checked checkbox values into my choice column in my sharepointlist     Could You please help me to fix these issue 

     

    * 'Risk Assessment Confirmed' column in your SharePoint list is a choice column and you're trying to update it with multiple values,

  • v-yueyun-msft Profile Picture
    on at

    Hi , @Danny_Dicaprio 

    I test it in my side , this is my sharePoint list :

    vyueyunmsft_0-1701670240651.png

    This is my canvas app:

    vyueyunmsft_1-1701670263015.png

    DataCardValue2 is my test Gallery. Gallery1 is used to select which item i need to update.

     

    Gallery1-OnSelect:   ClearCollect(varChoices ,ThisItem.MulChoices )

     

    Gallery -Items: Choices([@ChoicesTest].MulChoices)

    Checkbox - Text: ThisItem.Value

    Checkbox- OnCheck:  Collect(varChoices,ThisItem)

    Checkbox- OnUncheck: Remove(varChoices,ThisItem)

    CheckBox- Default : Self.Text in Concat(varChoices,Value,",")

     

    Button-OnSelect :Patch(ChoicesTest , Gallery1.Selected ,{MulChoices: varChoices}); Clear(varChoices);

     


    Best Regards,

    Yueyun Zhang

     

  • Danny_Dicaprio Profile Picture
    on at

    @v-yueyun-msft 

    Hey Iam not sure why it is happening to me 

     

    I changed  everything except the onselect of my gallery 

    Danny_Dicaprio_0-1701671194879.png

    It is showing like this. 

    Danny_Dicaprio_1-1701671602386.png

     

  • WarrenBelz Profile Picture
    153,049 Most Valuable Professional on at

    Hi @Danny_Dicaprio ,

    You can also try this assuming your save control is inside the gallery

    Patch(
     Risk_Database, 
     ThisItem,
     {
     'Risk Assessment Confirmed': 
     ForAll(
     Filter(
     Gallery1.AllItems,
     CheckBoxName.Value
     ) As _Items,
     {Value: _Items.Value}
     )
     }
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • v-yueyun-msft Profile Picture
    on at

    Hi , @Danny_Dicaprio 

    This code i put here , not in the Form :

    vyueyunmsft_0-1701671917080.png

    This Gallery is used to select which item i need to update . 
    And i put this Gallery1.Selected to my Form-Item.

     


    Best Regards,

    Yueyun Zhang

  • Danny_Dicaprio Profile Picture
    on at

    No, I have the formula in gallery properties only 

    Danny_Dicaprio_0-1701672573006.pngDanny_Dicaprio_1-1701672640299.pngDanny_Dicaprio_2-1701672671461.pngDanny_Dicaprio_3-1701672701973.pngDanny_Dicaprio_4-1701672730380.png

    \

    Danny_Dicaprio_5-1701672783921.pngDanny_Dicaprio_6-1701672825022.png

     

     

     

  • Danny_Dicaprio Profile Picture
    on at

    @WarrenBelz   Hi It is showing like this 

     

    Danny_Dicaprio_7-1701672940972.png

     

     

    Danny_Dicaprio_8-1701672960104.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard