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 / Patch Checkbox values ...
Power Apps
Suggested Answer

Patch Checkbox values into SharePoint list

(0) ShareShare
ReportReport
Posted on by 166
Hello All,
 
I have a SharePoint list page with my CheckBox values.
 
 
I have populated above values using a gallery Control.
 
 
Wrote Code on
OnCheck  - Collect(colJustification,ThisItem)
OnUnCheck events - Remove(colJustification,ThisItem)
 
When I tried with this code
 
'Justification to Forego Competitive Bid Process': colJustification
 
Got Below error
 
 
I also tried with .Value and .Text, but thats not working either.
 
Here is the Column setting in SharePoint
 
Categories:
I have the same question (0)
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
     
    Here's what you should do. 
    1. Add the choice options you have in a separate list to the Choice column instead. 
    2. Populate your gallery Items with the Choices from the choice column
    3. OnCheck and OnUncheck properties will remain the same
    4. Add a button to the screen to save the selections in your SP List
     
    Here's how the solution will look:
    Choice Column
    Gallery Items:
    Choices([@SPList].choice)
    OnCheck
    Collect(colJustification,ThisItem)
    OnUnCheck
    Remove(colJustification,ThisItem)
    Patch button
    //Replace the LookUp with Defaults(SPList) to Patch as New items 
    
    Patch(
        SPList,
        LookUp(
            SPList,
            ID = 2
        ),
        {
            choice: Distinct(
                colJustification,
                Value
            )
        }
    )
     
    Final Result
     
    If you still wish you to use a separate list for Choices, you can BUT you will need populate the Choice column with the exact values as choices. 
     
    Hope this helps. 
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     
  • PraveenC Profile Picture
    166 on at
    Hello @Nandit
     
    I have to use another Share point List and cant add the choices into a choices field directly as the length of each choice value is too long and we cant reduce their length. So I cant put the exact same values in both Share Point List and Choice column.

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard