cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kosenurm
Super User
Super User

Urgent - Select and deselect multiple checkboxes on toggle

Hi there,

 

I have a screen in my canvas app where I have a toggle to select-all checkboxes on that screen. 

 

OnVisible of the page, I have created the collection of allboxes using Collect(allboxes, 'checkbox1'.Value, 'checkbox2'.Value);   (I will add in the other 5 checkboxes once I've got this working).

 

What I want is, when the user turns the toggle to Yes, it ticks all the checkboxes which are in that collection. 

 

Please can someone help me out here?

 

Thanks, 

K. 

15 REPLIES 15

Thanks. Where are you setting the IsChecked value from?

just change {value:Toggle1} to {value:CheckBox1} etc

In my first response, i mentioned this.

On page load, ClearCollect(coll_GalDisplay,AddColumns(Source1,"ischecked",false)) this will create a collection "coll_GalDisplay" which we are going to use in gallery to display.

 

So on page load, I am adding an extra column to store the checkbox value all the time.

So do I change Source1 to the checkbox control (so, "CheckBox1.Value")?   There is no data source here, as it is purely driven from the checkboxes selected by the user... and I am not using a gallery.

 

Thanks,

K.

Hi @Kosenurm ,
I believe your checkboxes are independent. If I got you correctly, your set is something like the below screenshot.

on right side, I am trying to show the values reflected in coll_result based on my selection. 

Abhilash_Swain_0-1643046055067.png

Abhilash_Swain_1-1643046139487.png

 

Abhilash_Swain_2-1643046183377.png

Give a like and accept this as the solution if I answered you . 🙂 

Thanks, this seems to work. 

 

How can I find out what is contained in the coll_result variable in a label?

 

Thanks

K.

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.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

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 (2,920)