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

How to update a bit column in SQL from Powerapps

I am having a Listbox and Button in Powerapps. Based on the Listbox multipleselection I should Update a Bit column in SQL.

In Listbox Items : Sort(Filter('[dbo].[TEST_TASK_MAP_VIEW]', TEST_ID = Gallery1.Selected.TEST_ID), TASK_NUM, Ascending)

In Button Onselect : Updateif('[dbo].[TEST_TASK_MAP]', ListBox.SelectedItems, {ISACTIVE: 0}) or

                                 Updateif('[dbo].[TEST_TASK_MAP]', ListBox.SelectedItems, {ISACTIVE: false})

For both the above Updateif formulas, I am getting error. Can anyone help me how to update SQL column based on Listbox Selection.

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Anonymous ,

Try this

ForAll(
   ListBox.SelectedItems As MySel,
   Updateif(
      '[dbo].[TEST_TASK_MAP]',
      TEST_ID=MySel.TEST_ID,	  
      {ISACTIVE: fslse}
   )
)

 

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.

View solution in original post

1 REPLY 1
WarrenBelz
Super User
Super User

Hi @Anonymous ,

Try this

ForAll(
   ListBox.SelectedItems As MySel,
   Updateif(
      '[dbo].[TEST_TASK_MAP]',
      TEST_ID=MySel.TEST_ID,	  
      {ISACTIVE: fslse}
   )
)

 

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.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,827)