cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Update SQL database with checkbox

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
Highlighted
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.

Highlighted
Anonymous
Not applicable

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.

Highlighted
Community Support
Community Support

Re: Update SQL database with checkbox

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,987)