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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Updating an Item Colum...
Power Apps
Answered

Updating an Item Column from a CheckBox Input

(0) ShareShare
ReportReport
Posted on by 134

Hello All, 

 

I hope you are doing well. I am trying to update a an item column from a checkbox input. I have inserted the below formula which unfortunately it is returning an error. any advice eon this matter is highly appreciated . 

 

Thank you for your help. 

 

Najwa. 

 

Screen Shot 2020-06-07 at 7.59.14 PM.png

Categories:
  • eka24 Profile Picture
    20,925 on at

    What does the error message say when you hover on the red error signal.

     

    I don't see another checkbox2. Is it the same checkbox you are clicking to Patch? because that cannot work.

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@Najwa_Rahal,

    Based on the issue that you mentioned, do you want to update the column that corresponds to the checkbox?

    Could you please share more about "Bank Connectivity" column, is it a Text or a Choice? Combine that with the screenshot you provided, I assume that "Bank Connectivity" column is a Choice column.

    I have a test on my side, please take a try as below:

    • Set the OnCheck property of the Checkbox as below:

     

    Patch('Scope',Defaults('Scope'),{Title:"Super",Bank Connectivity:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Value: Checkbox2.Value
     }
     }
    )​

     

    Best Regards,

    Qi

     

     

  • Najwa_Rahal Profile Picture
    134 on at

    Hello @v-qiaqi-msft , 

     

    Yes Indeed Bank Connectivity is a multiple choice column and I have configured the requested formula and I get the blow errors : 

     

    Screen Shot 2020-06-08 at 2.10.06 PM.pngScreen Shot 2020-06-08 at 2.09.18 PM.png

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@Najwa_Rahal,

    I have checked the formula and tried to reproduce the issue that happened to you, I think we are almost there.

    First of all, you need to put a pair of single quotes ‘’ on your column name. A pair of single quotes is necessary when you have a column name with space in the SharePoint list.

    And then, the formula I provided earlier is for a single choice column instead of a multiple-choice column. A single choice column only needs to quote a record when updating, however, a multiple-choice column needs to be updated with a table format. We must ensure that the data types of the parameters on either side of the colon are matched.

    Please modify your formula as below:

     

     Patch('Scope', Defaults('Scope'),{Title:"Super",'Bank Connectivity':Table({ Value: Checkbox2.Value }) } )

     

    Best Regards,

    Qi

  • eka24 Profile Picture
    20,925 on at

    You can try:

    Patch(Scope, Defaults(Scope),{Title:"Super",'Bank Connectivity':{ Value: Checkbox2.Value } } )​

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Najwa_Rahal Profile Picture
    134 on at

    Hello @v-qiaqi-msft , 

     

    Thx for the reply. Unfortunately the formula did not work . I have the feeling it is an enigma 🙂

     

     

    Screen Shot 2020-06-10 at 9.06.51 AM.pngScreen Shot 2020-06-10 at 9.06.07 AM.png

  • Najwa_Rahal Profile Picture
    134 on at

    hi @eka24 , 

     

    It doesn't work either . 

     

    Screen Shot 2020-06-10 at 10.16.23 AM.png

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@Najwa_Rahal,

    I’m afraid that you should put the formula as below into the OnCheck property of your Checkbox2 because you have lost something important.

    Patch('Scope', Defaults('Scope'),{Title:"Super",’Bank Connectivity’:Table({

                Value: Checkbox2.Value

            })

        }

    )

    Ps: And if you want to update the Choice column item with the textinput of the Checkbox2, you'd better replace Checkbox2.Value with Checkbox2.Text. You can try both.

     

    Best Regards,

    Qi

  • Najwa_Rahal Profile Picture
    134 on at

    Hi @v-qiaqi-msft , 

     

    Appologies my mistake as I renamed the checkbox and it required a label update and it works just fine. 

     

    However, it seems that the formula adds a row and does not update the row. My list has only one item and each time I click ob the check box it creates an item row with value true and does not update the field itself. 

     

    Screen Shot 2020-06-10 at 11.02.04 AM.pngScreen Shot 2020-06-10 at 11.01.36 AM.png

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@Najwa_Rahal,

     

    Based on the issue that you mentioned, the formula I provided is based on the Patch() you wrote.

    Patch() quoting Defaults() does create a new record instead of updating the existing record. If you want to update, please quote Lookup() into Patch(). Please modify your formula as below:

     

    Patch('Scope', Lookup('Scope',ID=ThisItem.ID),{Title:"Super",’Bank Connectivity’:Table({

                Value: Checkbox2.Value         (You can also replace Checkbox2.Value with Checkbox2.Text depend on your needs)

            })

        }

    )

    Ps: ID is a unique value in your SP list, you can replace it with any other primary key in the SP list. For example, if there is only one row in the list, then you can quote this: Lookup('Scope',ID=1). It will update the first row of the records.

    Patch('Scope', Lookup('Scope',ID=1),{Title:"Super",’Bank Connectivity’:Table({
     Value: Checkbox2.Value (you can replace Checkbox2.Value with Checkbox2.Text) 
     })
     }
    )

    Last but not the least, if you want to update the column item with the textinput  in the Checkbox2, please replace Checkbox2.Value with Checkbox2.Text.

     

    Best Regards,

    Qi

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard