cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amaniramahi
Helper I
Helper I

Collection is not cleared

Hi, I am new to power apps

I have created a gallery with Multicheck boxes

and to collect the checked items I have created a collection to be updated on check/uncheck

The problem now is that the checked boxes are not clearing despite I added the following formula to screen OnVisible when landing 

Clear(ColProduct)

 

what is happening it clears the collection and submits the result as blank (if not checked anything else) but the boxes remains checked.. what did I miss here?


Edit: I need to add one more thing, since I am using multiple screens for thee same form, so the form mode is edit not new when I land to the screen with the checkboxes 

1 ACCEPTED SOLUTION

Accepted Solutions

@WarrenBelz , actually you helped .. you just opened my eyes how to look for the solution when you mentioned that I have checkbox inside a gallery inside a form,,, so when I looked for it this way I found the solution in this post.

 

 

Solved: Reseting checkbox - Power Platform Community (microsoft.com)

 

Thanks again 🙂

View solution in original post

10 REPLIES 10
WarrenBelz
Super User
Super User

Hi @amaniramahi ,

Set the Default of the CheckBox to false.

 

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.

Hi @WarrenBelz , thank you for the reply.

It is already set as false 

Hi @amaniramahi ,

What do you mean by "multicheck boxes" and what is your collection code? I also assume that the boxes are not linked to any field in the collection?

@WarrenBelz 

 

The card was a dropdown menu for the options with the ability to select more than one option, so to make it more user friendly, I replaced the combo box with a gallery, and inserted checkbox as an input

2021-10-25_9-23-47.png

The items of the gallery are the same formula was for the dropdown menu 

Choices([@'Hino Sales Visit Feedback'].ProductMulti)

Then for the checkbox text (Thisitem.value)

and for checkbox OnCheck

Collect(ColProduct,ThisItem)

 and for OnUncheck

Remove(ColProduct,ThisItem)

 

I have attached the file If you'd like to take a look

@amaniramahi ,

It would have been good if you posted that in your initial post - you have a checkbox inside a gallery inside a data card inside a form and you need to reset it? The only way I can think of that may be possible is to link it to a boolean field in the collection and add at least one record with this field created as false.

@WarrenBelz  Apologies, but can you elaborate, this is my first trial to do an app and I've watched tons of videos on youtube to do it.

I would really appreciate it if you could tell me what to do exactly.

Hi @amaniramahi ,

Looking at your app - if you are this early in your Power Apps journey, please consider going back to a multi-select combo box. The path I suggested earlier will most likely affect other things you are trying to do.

Hi @WarrenBelz , I came here to the community to try and learn.. 

It's ok, I will look for the solution somewhere else and won't give up.. unless Power Apps is that "limited"

 

Anyway, thank you for your time 

@amaniramahi ,

I have never found the need to use that function and would have to build a model to probably find that (as I mentioned) the solution would have limitations on the rest of the process. What you are attempting is not a standard process (actually you are using a control, for something it was not designed for). I apologise for responding as I normally restrict my threads to things I know I can assist with, but your initial post did not suggest what the actual structure was.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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