cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

How to update textbox value only when selected checkbox

Hi Mates,

How do i update rows when only the correspond checkbox selected, means if check box is not Selected(checked) should not update.

if you see below three controls are there Lable,Textbox,CheckBox.

checkbox.PNG 

from the above screen, only three checkboxes are selected means (respective textbox values has to update when click on button,

if selected only two checkbox then respective textbox values should update in corresponding rows.

As of now i can update with below formula where name=testname from single textbox.

Patch('[dbo].[Test]',First(Filter('[dbo].[Test]',name="testname")),title: Txtbox.Text})

but how do i get only textbox values from selected checkbox rows..

your help is highly appreciated.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: How to update textbox value only when selected checkbox

OnVisible of the Screen
ClearCollect(MyColl,Defaults(YourTable))

Use:

OnCheck Of the CheckBox:

Patch(MyColl, ThisItem,{Title:Textbox1.Text})

 

OnUncheck Of the CheckBox:

If(ThisItem.ID exactin MyColl.ID, Remove(MyColl, LookUp(MyColl,ID=ThisItem.ID)))

 

After you are Ok with Ticking all the CheckBox, Patch using the Button On your Screen not inside the Gallery

ForAll(MyColl, Patch(YourTable,Defaults(YourTable),

{Title:Title}))

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

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.

View solution in original post

4 REPLIES 4
Highlighted
Super User III
Super User III

Re: How to update textbox value only when selected checkbox

Are the texboxes in a Gallery?

If not are you patch all of them to title collumn or different columns

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

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.

 

Highlighted
Helper V
Helper V

Re: How to update textbox value only when selected checkbox

Hi @eka24 

TextBox is in gallery only. as i said there are three controls in gallery.

 

Can`t we update If Text box in gallery,..?

Highlighted
Super User III
Super User III

Re: How to update textbox value only when selected checkbox

I didn't see gallery in your request.

Try on OnCheck of the checkbox:

Patch('Data Source', ThisItem, {Title: TextboxName.Text})

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

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.

Highlighted
Super User III
Super User III

Re: How to update textbox value only when selected checkbox

OnVisible of the Screen
ClearCollect(MyColl,Defaults(YourTable))

Use:

OnCheck Of the CheckBox:

Patch(MyColl, ThisItem,{Title:Textbox1.Text})

 

OnUncheck Of the CheckBox:

If(ThisItem.ID exactin MyColl.ID, Remove(MyColl, LookUp(MyColl,ID=ThisItem.ID)))

 

After you are Ok with Ticking all the CheckBox, Patch using the Button On your Screen not inside the Gallery

ForAll(MyColl, Patch(YourTable,Defaults(YourTable),

{Title:Title}))

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

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.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,485)