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

Select All from Gallery

I have a gallery that lists data which can potentially be deleted from the SharePoint List that it is stored in.  I would like to add a Select All feature on it but can't seem to get it to do what i want it to do.

 

In the gallery i have added a checkbox with the following formulas:

 

OnCheck Property:

Collect(DeleteItems, ThisItem)

UnCheck Property:

Remove(DeleteItems, ThisItem)

Outside of the gallery i have adedd another checkbox with text saying Select All next to it.

 

I have added on the default property of the checkbox in the gallery:

Checkbox1.Value

If i select a single item from the gallery,  the item saves into the collection, if i unselect it, it is removed from the collection. 

 

However, when i select the Select All checkbox, all the checkboxes in the gallery are selected but don't get collected in the deleteitems collection.

 

Is there a formula i can add to resolve this?

 

Also, if this does get fixed i would also like it so that if all are selected but i decide to unselect one or two items, those items are removed from the collection and the remaining selected ones are still collected.

 

thanks

 

2 REPLIES 2
Anonymous
Not applicable

Hi,

 

You can do ForAll(Gallery; If(Not(ThisItem in DeleteItems);Collect(DeleteIems;ThisItem)))

on the outside checkbox property ?

 

Regards,

 

Louis

@Anonymous 

Thanks for you reply, unfortunately that is not working

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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