cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aeng30
Level: Powered On

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
Community Support Team
Community Support Team

Re: Update SQL database with checkbox

Hi @aeng30 ,

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
Super User
Super User

Re: Update SQL database with checkbox

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.

aeng30
Level: Powered On

Re: Update SQL database with checkbox

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

Community Support Team
Community Support Team

Re: Update SQL database with checkbox

Hi @aeng30 ,

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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,606)