cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Update SQL database with checkbox

New to powerapps. Need to update a field in my database to 'true' by checking a checkbox. Currently it is staying false in my database, whether the box is checked or not. 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous ,

Could you tell me the data type of the field that you want to update to true?

I've made a similar test for your reference:

I assume that field's data type is bit.

1)unlock this field's datacard

2)delete toggle control

3)insert check boxes

4)Set its datacard's Update:

If(Checkbox1.Value=true,true,Checkbox2.Value=true,false)

5)Set checkbox1's Default:

If(ThisItem.test4=true,true,false)

Set checkbox2's Default:

If(ThisItem.test4=false,true,false)

 

Then, this field will be updated successfully.

Please note that refresh table in SQL Server may not display the latest data. Try to reopen the table.627.png

 

 

Best regards,

Community Support Team _ Phoebe Liu

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
LRVinNC
Super User
Super User

How are you performing the update?  With an edit form?  With a patch statement?  Please post what you are using to apply this update and we will try to assist you.

LRVinNC

------------------
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.
Anonymous
Not applicable

I'm using an edit form. I have multiple controls already sending information to the database which are working, but the checkbox is not.

Hi @Anonymous ,

Could you tell me the data type of the field that you want to update to true?

I've made a similar test for your reference:

I assume that field's data type is bit.

1)unlock this field's datacard

2)delete toggle control

3)insert check boxes

4)Set its datacard's Update:

If(Checkbox1.Value=true,true,Checkbox2.Value=true,false)

5)Set checkbox1's Default:

If(ThisItem.test4=true,true,false)

Set checkbox2's Default:

If(ThisItem.test4=false,true,false)

 

Then, this field will be updated successfully.

Please note that refresh table in SQL Server may not display the latest data. Try to reopen the table.627.png

 

 

Best regards,

Community Support Team _ Phoebe Liu

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,378)